summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-10 14:41:39 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-11-10 14:42:31 (GMT)
commitf4f3fca99fd4dc473fba31f17c5d09b8b6e2d1fb (patch)
treec7cb3a561f44d5626bddce10806ef3c4ae4f4f64 /Tests
parent9321379d7ea2e43486a22aa3e0de4581ceac20c4 (diff)
parentcbc51a8be36b4448048c68106fd895eccee8b9fb (diff)
downloadCMake-f4f3fca99fd4dc473fba31f17c5d09b8b6e2d1fb.zip
CMake-f4f3fca99fd4dc473fba31f17c5d09b8b6e2d1fb.tar.gz
CMake-f4f3fca99fd4dc473fba31f17c5d09b8b6e2d1fb.tar.bz2
Merge topic 'android-root'
cbc51a8be3 Android: restructure android search paths Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: huangqinjin <huangqinjin@gmail.com> Merge-request: !5479
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/Android/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/Android/ndk-search-order.cmake17
2 files changed, 24 insertions, 0 deletions
diff --git a/Tests/RunCMake/Android/RunCMakeTest.cmake b/Tests/RunCMake/Android/RunCMakeTest.cmake
index c4b1a00..aa0cf4d 100644
--- a/Tests/RunCMake/Android/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Android/RunCMakeTest.cmake
@@ -103,6 +103,13 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
set(ndk_arg)
endif()
+ set(RunCMake_TEST_OPTIONS
+ -DCMAKE_SYSTEM_NAME=Android
+ -DCMAKE_FIND_ROOT_PATH=/tmp
+ ${ndk_arg}
+ )
+ run_cmake(ndk-search-order)
+
# Test failure cases.
message(STATUS "ndk='${ndk}'")
if(RunCMake_GENERATOR MATCHES "Visual Studio")
diff --git a/Tests/RunCMake/Android/ndk-search-order.cmake b/Tests/RunCMake/Android/ndk-search-order.cmake
new file mode 100644
index 0000000..498d775
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-search-order.cmake
@@ -0,0 +1,17 @@
+if(NOT CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED)
+ return()
+endif()
+
+find_library(LIBDL dl)
+if(NOT LIBDL)
+ message(FATAL_ERROR "libdl not found.")
+endif()
+
+if(LIBDL MATCHES ".a$")
+ message(FATAL_ERROR "found libdl.a")
+endif()
+
+find_program(CLANG clang)
+if(NOT CLANG)
+ message(FATAL_ERROR "clang not found")
+endif()