summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-04-24 20:02:36 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-04-24 20:02:36 +0200
commit5bda6b0a8ed20f8296a2de3fd6637b59cd614036 (patch)
tree6b761a0f4c187e9eee943b78bb74e4db26f00b9b
parent77a469de95a498a4860b7da72b38508d40c2bede (diff)
tracker/aruco: fix compile test cache variable name
-rw-r--r--tracker-aruco/CMakeLists.txt20
1 files changed, 7 insertions, 13 deletions
diff --git a/tracker-aruco/CMakeLists.txt b/tracker-aruco/CMakeLists.txt
index 82cef795..7f7871ef 100644
--- a/tracker-aruco/CMakeLists.txt
+++ b/tracker-aruco/CMakeLists.txt
@@ -22,19 +22,13 @@ if(OpenCV_FOUND)
get_filename_component(dir "${dir}" ABSOLUTE)
set(dir "${dir}/include")
- file(TIMESTAMP "${SDK_ARUCO_LIBPATH}" tm "%s" UTC)
- set(cache-str "${tm}^|^${SDK_ARUCO_LIBPATH}")
-
- if(NOT aruco_has-working-abi STREQUAL "${cache-str}")
- try_compile(result "${CMAKE_CURRENT_BINARY_DIR}"
- SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/compile-test/abi.cpp"
- CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${dir}"
- OUTPUT_VARIABLE krap)
- if(NOT result)
- message(FATAL_ERROR "${krap}\n" "Must use Aruco fork from <https://github.com/opentrack/aruco>")
- endif()
-
- set(aruco_has-working-abi "${cache-str}" CACHE INTERNAL "" FORCE)
+ try_compile(tracker-aruco_has-working-abi "${CMAKE_CURRENT_BINARY_DIR}"
+ SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/compile-test/abi.cpp"
+ CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${dir}"
+ "-DCXX_STANDARD=17" "-DCXX_STANDARD_REQUIRED=1"
+ OUTPUT_VARIABLE krap)
+ if(NOT tracker-aruco_has-working-abi)
+ message(FATAL_ERROR "${krap}\n" "Must use Aruco fork from <https://github.com/opentrack/aruco>")
endif()
otr_module(tracker-aruco)