diff options
author | Brad King <brad.king@kitware.com> | 2016-06-21 20:18:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-23 16:53:10 (GMT) |
commit | c2f561e58c799cc82df7db70710ae2f79b8b6b64 (patch) | |
tree | d9e2731bf554993ecd5381d46c0318a9a7398b19 /Tests/RunCMake/CMakeLists.txt | |
parent | 6b84df8da98169af43d4173dfbd1dedf5979dcb2 (diff) | |
download | CMake-c2f561e58c799cc82df7db70710ae2f79b8b6b64.zip CMake-c2f561e58c799cc82df7db70710ae2f79b8b6b64.tar.gz CMake-c2f561e58c799cc82df7db70710ae2f79b8b6b64.tar.bz2 |
Android: Add test cases covering use of the NDK and standalone toolchains
Diffstat (limited to 'Tests/RunCMake/CMakeLists.txt')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index dbd5530..323a36b 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -327,3 +327,24 @@ add_RunCMake_test_group(CPack "DEB;RPM;TGZ") # add a test to make sure symbols are exported from a shared library # for MSVC compilers CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS property is used add_RunCMake_test(AutoExportDll) + +if(CMake_TEST_ANDROID_NDK OR CMake_TEST_ANDROID_STANDALONE_TOOLCHAIN) + if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja") + message(FATAL_ERROR "Android tests supported only by Makefile and Ninja generators") + endif() + foreach(v TEST_ANDROID_NDK TEST_ANDROID_STANDALONE_TOOLCHAIN) + if(CMake_${v}) + string(REPLACE ";" "|" ${v} "${CMake_${v}}") + list(APPEND Android_ARGS "-D${v}=${${v}}") + endif() + endforeach() + + add_RunCMake_test(Android) + + # This test can take a very long time due to lots of combinations. + # Use a long default timeout and provide an option to customize it. + if(NOT DEFINED CMake_TEST_ANDROID_TIMEOUT) + set(CMake_TEST_ANDROID_TIMEOUT 3000) + endif() + set_property(TEST RunCMake.Android PROPERTY TIMEOUT ${CMake_TEST_ANDROID_TIMEOUT}) +endif() |