diff options
author | Brad King <brad.king@kitware.com> | 2021-03-03 15:20:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-03-03 15:27:50 (GMT) |
commit | ed7a87f27055bd196d3f4af2468b935301fce727 (patch) | |
tree | 44409f55bfe0bb972dca7ed6030b890753c91f8c /Tests/RunCMake/Android | |
parent | 4950d3573331678b58fef36524723579edaa7172 (diff) | |
download | CMake-ed7a87f27055bd196d3f4af2468b935301fce727.zip CMake-ed7a87f27055bd196d3f4af2468b935301fce727.tar.gz CMake-ed7a87f27055bd196d3f4af2468b935301fce727.tar.bz2 |
Tests: Update RunCMake.Android for NDK r22
Use `CMAKE_ANDROID_NDK_VERSION` to check for files expected based
on the version of the NDK.
Diffstat (limited to 'Tests/RunCMake/Android')
-rw-r--r-- | Tests/RunCMake/Android/common.cmake | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Tests/RunCMake/Android/common.cmake b/Tests/RunCMake/Android/common.cmake index 32412aa..7c80a04 100644 --- a/Tests/RunCMake/Android/common.cmake +++ b/Tests/RunCMake/Android/common.cmake @@ -5,10 +5,21 @@ if(NOT ANDROID) message(SEND_ERROR "CMake variable 'ANDROID' is not set to a true value.") endif() -foreach(f - "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}ar${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}" +set(files + "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}ar${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}" + ) +if(NOT CMAKE_ANDROID_NDK_VERSION VERSION_GREATER_EQUAL 22) + list(APPEND files "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}ld${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}" ) +endif() +if(NOT CMAKE_ANDROID_NDK_VERSION VERSION_GREATER_EQUAL 19) + list(APPEND files + "${CMAKE_C_ANDROID_TOOLCHAIN_PREFIX}gcc${CMAKE_C_ANDROID_TOOLCHAIN_SUFFIX}" + "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}g++${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}" + ) +endif() +foreach(f IN LISTS files) if(NOT EXISTS "${f}") message(SEND_ERROR "Expected file does not exist:\n \"${f}\"") endif() |