summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-08-28 13:44:03 (GMT)
committerBrad King <brad.king@kitware.com>2018-08-28 13:44:03 (GMT)
commit0e764082fe5f9d9c0e33244412f0d4a519e4a2e6 (patch)
tree2b506a068cbd50ce02744f424f08b418c4458b41 /Tests/RunCMake
parentfef24e72a9d389379ba0a60efe5cf12905e62c31 (diff)
parentca97d4cb5f5872fb63b36a09fff6ee865bbcbb23 (diff)
downloadCMake-0e764082fe5f9d9c0e33244412f0d4a519e4a2e6.zip
CMake-0e764082fe5f9d9c0e33244412f0d4a519e4a2e6.tar.gz
CMake-0e764082fe5f9d9c0e33244412f0d4a519e4a2e6.tar.bz2
Merge branch 'android-ndk-r18' into release-3.12
Merge-request: !2319
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/Android/RunCMakeTest.cmake11
-rw-r--r--Tests/RunCMake/Android/common.cmake7
2 files changed, 12 insertions, 6 deletions
diff --git a/Tests/RunCMake/Android/RunCMakeTest.cmake b/Tests/RunCMake/Android/RunCMakeTest.cmake
index 2027c4f..45798ce 100644
--- a/Tests/RunCMake/Android/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Android/RunCMakeTest.cmake
@@ -61,8 +61,12 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
list(APPEND _abis_${_version} ${_abis})
endif()
endforeach()
- set(_abis_ ${_abis_${_latest_gcc}})
set(_abis_clang ${_abis_${_latest_clang}})
+ if(_latest_gcc)
+ set(_abis_ ${_abis_${_latest_gcc}})
+ else()
+ set(_abis_ ${_abis_clang})
+ endif()
if(_versions MATCHES "clang")
set(_versions "clang" ${_versions})
endif()
@@ -132,10 +136,11 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
set(stl_types
none
system
- gnustl_static
- gnustl_shared
)
+ if(IS_DIRECTORY "${ndk}/sources/cxx-stl/gnu-libstdc++")
+ list(APPEND stl_types gnustl_static gnustl_shared)
+ endif()
if(IS_DIRECTORY "${ndk}/sources/cxx-stl/gabi++/libs")
list(APPEND stl_types gabi++_static gabi++_shared)
endif()
diff --git a/Tests/RunCMake/Android/common.cmake b/Tests/RunCMake/Android/common.cmake
index f931be1..aaa7c89 100644
--- a/Tests/RunCMake/Android/common.cmake
+++ b/Tests/RunCMake/Android/common.cmake
@@ -8,7 +8,6 @@ endif()
foreach(f
"${CMAKE_C_ANDROID_TOOLCHAIN_PREFIX}gcc${CMAKE_C_ANDROID_TOOLCHAIN_SUFFIX}"
"${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}g++${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}"
- "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}cpp${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}"
"${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}ar${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}"
"${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}ld${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}"
)
@@ -61,10 +60,12 @@ execute_process(
if(NOT _res EQUAL 0)
message(SEND_ERROR "Failed to run 'gcc -dumpmachine':\n ${_res}")
endif()
-if(NOT _out STREQUAL "${CMAKE_C_ANDROID_TOOLCHAIN_MACHINE}")
+string(REPLACE "--" "-" _out_check "${_out}")
+if(NOT _out_check STREQUAL "${CMAKE_C_ANDROID_TOOLCHAIN_MACHINE}"
+ AND NOT (_out STREQUAL "arm--linux-android" AND CMAKE_C_ANDROID_TOOLCHAIN_MACHINE STREQUAL "arm-linux-androideabi"))
message(SEND_ERROR "'gcc -dumpmachine' produced:\n"
" ${_out}\n"
- "which is not equal to CMAKE_C_ANDROID_TOOLCHAIN_MACHINE:\n"
+ "which does not match CMAKE_C_ANDROID_TOOLCHAIN_MACHINE:\n"
" ${CMAKE_C_ANDROID_TOOLCHAIN_MACHINE}"
)
endif()