summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>2019-04-22 03:50:16 (GMT)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>2019-04-22 03:50:16 (GMT)
commit8cfa5b45a4f6a8ab40e35ee699af4dc899179609 (patch)
treed4c46dd87ae593b7e8dd35a390f25687fe1ea288
parent090005abfd5d5eee8ba9ad29b64a118106e88ad7 (diff)
downloadnnfw-8cfa5b45a4f6a8ab40e35ee699af4dc899179609.zip
nnfw-8cfa5b45a4f6a8ab40e35ee699af4dc899179609.tar.gz
nnfw-8cfa5b45a4f6a8ab40e35ee699af4dc899179609.tar.bz2
Ignore try-run result on cross build (#5031)
* Ignore try-run result Ignore try-run result on cross build when finding cmake threads package Threads package is checked when finding pre-installed tflite package Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com> * Fix comment
-rw-r--r--cmake/buildtool/cross/toolchain_aarch64-linux.cmake3
-rw-r--r--cmake/buildtool/cross/toolchain_aarch64-tizen.cmake3
-rw-r--r--cmake/buildtool/cross/toolchain_armv7l-linux.cmake3
-rw-r--r--cmake/buildtool/cross/toolchain_armv7l-tizen.cmake2
4 files changed, 11 insertions, 0 deletions
diff --git a/cmake/buildtool/cross/toolchain_aarch64-linux.cmake b/cmake/buildtool/cross/toolchain_aarch64-linux.cmake
index 8d3bd8f..86169af 100644
--- a/cmake/buildtool/cross/toolchain_aarch64-linux.cmake
+++ b/cmake/buildtool/cross/toolchain_aarch64-linux.cmake
@@ -34,3 +34,6 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# Set cache variable to ignore try-run error by find_package(Threads REQUIRED) on cross build
+set(THREADS_PTHREAD_ARG "2" CACHE STRING "Result from TRY_RUN" FORCE)
diff --git a/cmake/buildtool/cross/toolchain_aarch64-tizen.cmake b/cmake/buildtool/cross/toolchain_aarch64-tizen.cmake
index 5bb3929..c521d16 100644
--- a/cmake/buildtool/cross/toolchain_aarch64-tizen.cmake
+++ b/cmake/buildtool/cross/toolchain_aarch64-tizen.cmake
@@ -37,6 +37,9 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+# Set cache variable to ignore try-run error by find_package(Threads REQUIRED) on cross build
+set(THREADS_PTHREAD_ARG "2" CACHE STRING "Result from TRY_RUN" FORCE)
+
add_compile_options(--sysroot=${ROOTFS_DIR})
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --sysroot=${ROOTFS_DIR}")
diff --git a/cmake/buildtool/cross/toolchain_armv7l-linux.cmake b/cmake/buildtool/cross/toolchain_armv7l-linux.cmake
index 733c67b..b9966eb 100644
--- a/cmake/buildtool/cross/toolchain_armv7l-linux.cmake
+++ b/cmake/buildtool/cross/toolchain_armv7l-linux.cmake
@@ -33,3 +33,6 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# Set cache variable to ignore try-run error by find_package(Threads REQUIRED) on cross build
+set(THREADS_PTHREAD_ARG "2" CACHE STRING "Result from TRY_RUN" FORCE)
diff --git a/cmake/buildtool/cross/toolchain_armv7l-tizen.cmake b/cmake/buildtool/cross/toolchain_armv7l-tizen.cmake
index 444181a..fd059c7 100644
--- a/cmake/buildtool/cross/toolchain_armv7l-tizen.cmake
+++ b/cmake/buildtool/cross/toolchain_armv7l-tizen.cmake
@@ -37,6 +37,8 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+# Set cache variable to ignore try-run error by find_package(Threads REQUIRED) on cross build
+set(THREADS_PTHREAD_ARG "2" CACHE STRING "Result from TRY_RUN" FORCE)
add_compile_options(-mthumb)