summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake9
-rw-r--r--Modules/CMakeDetermineOBJCCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineOBJCXXCompiler.cmake2
-rw-r--r--Modules/CPackIFW.cmake13
-rw-r--r--Modules/CTest.cmake8
-rw-r--r--Modules/CompilerId/Xcode-3.pbxproj.in2
-rw-r--r--Modules/DartConfiguration.tcl.in4
-rw-r--r--Modules/FindBLAS.cmake8
-rw-r--r--Modules/FindRuby.cmake20
-rw-r--r--Modules/Platform/Android-Determine.cmake137
12 files changed, 121 insertions, 88 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 2f1b0a3..ae3abe9 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -111,7 +111,7 @@ if(NOT CMAKE_C_COMPILER_ID_RUN)
# ...
# /path/to/cc ...CompilerIdC/...
# to extract the compiler front-end for the language.
- set(CMAKE_C_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdC/(\\./)?(CompilerIdC.(framework|xctest)/)?CompilerIdC[ \t\n\\\"]")
+ set(CMAKE_C_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdC/(\\./)?(CompilerIdC.(framework|xctest|build/[^ \t\r\n]+)/)?CompilerIdC[ \t\n\\\"]")
set(CMAKE_C_COMPILER_ID_TOOL_MATCH_INDEX 2)
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 2b27476..905eb25 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -108,7 +108,7 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN)
# ...
# /path/to/cc ...CompilerIdCXX/...
# to extract the compiler front-end for the language.
- set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdCXX/(\\./)?(CompilerIdCXX.(framework|xctest)/)?CompilerIdCXX[ \t\n\\\"]")
+ set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdCXX/(\\./)?(CompilerIdCXX.(framework|xctest|build/[^ \t\r\n]+)/)?CompilerIdCXX[ \t\n\\\"]")
set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_INDEX 2)
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 688e1d8..d907926 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -516,9 +516,16 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_OSX_SYSROOT MATCHES "^$|[Mm][Aa][Cc][Oo][Ss]")
# When targeting macOS, use only the host architecture.
- set(id_archs [[ARCHS = "$(NATIVE_ARCH_ACTUAL)";]])
+ if (_CMAKE_APPLE_ARCHS_DEFAULT)
+ set(id_archs "ARCHS = \"${_CMAKE_APPLE_ARCHS_DEFAULT}\";")
+ set(id_arch_active "ONLY_ACTIVE_ARCH = NO;")
+ else()
+ set(id_archs [[ARCHS = "$(NATIVE_ARCH_ACTUAL)";]])
+ set(id_arch_active "ONLY_ACTIVE_ARCH = YES;")
+ endif()
else()
set(id_archs "")
+ set(id_arch_active "ONLY_ACTIVE_ARCH = YES;")
endif()
configure_file(${CMAKE_ROOT}/Modules/CompilerId/Xcode-3.pbxproj.in
${id_dir}/CompilerId${lang}.xcodeproj/project.pbxproj @ONLY)
diff --git a/Modules/CMakeDetermineOBJCCompiler.cmake b/Modules/CMakeDetermineOBJCCompiler.cmake
index 709eb25..4b84c8a 100644
--- a/Modules/CMakeDetermineOBJCCompiler.cmake
+++ b/Modules/CMakeDetermineOBJCCompiler.cmake
@@ -112,7 +112,7 @@ if(NOT CMAKE_OBJC_COMPILER_ID_RUN)
# ...
# /path/to/cc ...CompilerIdOBJC/...
# to extract the compiler front-end for the language.
- set(CMAKE_OBJC_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdOBJC/(\\./)?(CompilerIdOBJC.(framework|xctest)/)?CompilerIdOBJC[ \t\n\\\"]")
+ set(CMAKE_OBJC_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdOBJC/(\\./)?(CompilerIdOBJC.(framework|xctest|build/[^ \t\r\n]+)/)?CompilerIdOBJC[ \t\n\\\"]")
set(CMAKE_OBJC_COMPILER_ID_TOOL_MATCH_INDEX 2)
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
diff --git a/Modules/CMakeDetermineOBJCXXCompiler.cmake b/Modules/CMakeDetermineOBJCXXCompiler.cmake
index ffd0091..7403847 100644
--- a/Modules/CMakeDetermineOBJCXXCompiler.cmake
+++ b/Modules/CMakeDetermineOBJCXXCompiler.cmake
@@ -117,7 +117,7 @@ if(NOT CMAKE_OBJCXX_COMPILER_ID_RUN)
# ...
# /path/to/cc ...CompilerIdOBJCXX/...
# to extract the compiler front-end for the language.
- set(CMAKE_OBJCXX_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdOBJCXX/(\\./)?(CompilerIdOBJCXX.(framework|xctest)/)?CompilerIdOBJCXX[ \t\n\\\"]")
+ set(CMAKE_OBJCXX_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdOBJCXX/(\\./)?(CompilerIdOBJCXX.(framework|xctest|build/[^ \t\r\n]+)/)?CompilerIdOBJCXX[ \t\n\\\"]")
set(CMAKE_OBJCXX_COMPILER_ID_TOOL_MATCH_INDEX 2)
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index 58e6a37..6ce0bfc 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -361,6 +361,7 @@ set(_CPACK_IFW_PREFIXES
"QtIFW-")
set(_CPACK_IFW_VERSIONS
+ "4.0"
"3.2"
"3.2.0"
"3.1"
@@ -436,6 +437,16 @@ find_program(CPACK_IFW_DEVTOOL_EXECUTABLE
)
mark_as_advanced(CPACK_IFW_DEVTOOL_EXECUTABLE)
+# Look for 'archivegen'
+
+find_program(CPACK_IFW_ARCHIVEGEN_EXECUTABLE
+ NAMES archivegen
+ PATHS ${_CPACK_IFW_PATHS}
+ PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES}
+ DOC "QtIFW archivegen command line client"
+ )
+mark_as_advanced(CPACK_IFW_ARCHIVEGEN_EXECUTABLE)
+
#
## Next code is included only once
#
@@ -456,7 +467,7 @@ mark_as_advanced(CPACK_IFW_FRAMEWORK_VERSION_TIMEOUT)
if(CPACK_IFW_INSTALLERBASE_EXECUTABLE AND NOT CPACK_IFW_FRAMEWORK_VERSION_FORCED)
set(CPACK_IFW_FRAMEWORK_VERSION)
# Invoke version from "installerbase" executable
- foreach(_ifw_version_argument --framework-version --version)
+ foreach(_ifw_version_argument --version --framework-version)
if(NOT CPACK_IFW_FRAMEWORK_VERSION)
execute_process(COMMAND
"${CPACK_IFW_INSTALLERBASE_EXECUTABLE}" ${_ifw_version_argument}
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index 8d04be3..a18e85b 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -179,12 +179,6 @@ if(BUILD_TESTING)
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]"
DOC "Path to the memory checking command, used for memory error detection."
)
- find_program(SLURM_SBATCH_COMMAND sbatch DOC
- "Path to the SLURM sbatch executable"
- )
- find_program(SLURM_SRUN_COMMAND srun DOC
- "Path to the SLURM srun executable"
- )
set(MEMORYCHECK_SUPPRESSIONS_FILE "" CACHE FILEPATH
"File that contains suppressions for the memory checker")
find_program(COVERAGE_COMMAND gcov DOC
@@ -263,8 +257,6 @@ if(BUILD_TESTING)
MAKECOMMAND
MEMORYCHECK_COMMAND
MEMORYCHECK_SUPPRESSIONS_FILE
- SLURM_SBATCH_COMMAND
- SLURM_SRUN_COMMAND
SITE
SVNCOMMAND
)
diff --git a/Modules/CompilerId/Xcode-3.pbxproj.in b/Modules/CompilerId/Xcode-3.pbxproj.in
index 6fe17e5..aab357a 100644
--- a/Modules/CompilerId/Xcode-3.pbxproj.in
+++ b/Modules/CompilerId/Xcode-3.pbxproj.in
@@ -80,11 +80,11 @@
1DEB928A08733DD80010E9CD = {
isa = XCBuildConfiguration;
buildSettings = {
- ONLY_ACTIVE_ARCH = YES;
CODE_SIGNING_REQUIRED = NO;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
SYMROOT = .;
@id_archs@
+ @id_arch_active@
@id_toolset@
@id_lang_version@
@id_clang_cxx_library@
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index d318c26..41cb9b7 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -83,10 +83,6 @@ MemoryCheckSuppressionFile: @MEMORYCHECK_SUPPRESSIONS_FILE@
CoverageCommand: @COVERAGE_COMMAND@
CoverageExtraFlags: @COVERAGE_EXTRA_FLAGS@
-# Cluster commands
-SlurmBatchCommand: @SLURM_SBATCH_COMMAND@
-SlurmRunCommand: @SLURM_SRUN_COMMAND@
-
# Testing options
# TimeOut is the amount of time in seconds to wait for processes
# to complete during testing. After TimeOut seconds, the
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index e4353df..715049b 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -586,16 +586,22 @@ if(BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
else()
find_package(Threads REQUIRED)
endif()
+ set(_threadlibs "${CMAKE_THREAD_LIBS_INIT}")
+ if(BLA_STATIC)
+ find_package(OpenMP COMPONENTS C)
+ list(PREPEND _threadlibs "${OpenMP_C_LIBRARIES}")
+ endif()
check_blas_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"openblas"
- "${CMAKE_THREAD_LIBS_INIT}"
+ "${_threadlibs}"
""
""
)
+ unset(_threadlibs)
endif()
endif()
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index a0cdf3b..d12f825 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -401,6 +401,7 @@ if(Ruby_VERSION_MAJOR)
set(_Ruby_VERSION_SHORT "${Ruby_VERSION_MAJOR}.${Ruby_VERSION_MINOR}")
set(_Ruby_VERSION_SHORT_NODOT "${Ruby_VERSION_MAJOR}${Ruby_VERSION_MINOR}")
set(_Ruby_NODOT_VERSION "${Ruby_VERSION_MAJOR}${Ruby_VERSION_MINOR}${Ruby_VERSION_PATCH}")
+ set(_Ruby_NODOT_VERSION_ZERO_PATCH "${Ruby_VERSION_MAJOR}${Ruby_VERSION_MINOR}0")
endif()
# FIXME: Currently we require both the interpreter and development components to be found
@@ -433,22 +434,27 @@ endif()
set(_Ruby_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_Ruby_VERSION_SHORT} ruby${_Ruby_VERSION_SHORT_NODOT} ruby-${_Ruby_VERSION_SHORT} ruby-${Ruby_VERSION})
if(WIN32)
+ set(_Ruby_POSSIBLE_MSVC_RUNTIMES "msvcrt;vcruntime140;vcruntime140_1")
if(MSVC_TOOLSET_VERSION)
- set(_Ruby_MSVC_RUNTIME "${MSVC_TOOLSET_VERSION}")
+ list(APPEND _Ruby_POSSIBLE_MSVC_RUNTIMES "msvcr${MSVC_TOOLSET_VERSION}")
else()
- set(_Ruby_MSVC_RUNTIME "")
+ list(APPEND _Ruby_POSSIBLE_MSVC_RUNTIMES "msvcr")
endif()
+ set(_Ruby_POSSIBLE_VERSION_SUFFICES "${_Ruby_NODOT_VERSION};${_Ruby_NODOT_VERSION_ZERO_PATCH}")
+
set(_Ruby_ARCH_PREFIX "")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_Ruby_ARCH_PREFIX "x64-")
endif()
- list(APPEND _Ruby_POSSIBLE_LIB_NAMES
- "${_Ruby_ARCH_PREFIX}msvcr${_Ruby_MSVC_RUNTIME}-ruby${_Ruby_NODOT_VERSION}"
- "${_Ruby_ARCH_PREFIX}msvcr${_Ruby_MSVC_RUNTIME}-ruby${_Ruby_NODOT_VERSION}-static"
- "${_Ruby_ARCH_PREFIX}msvcrt-ruby${_Ruby_NODOT_VERSION}"
- "${_Ruby_ARCH_PREFIX}msvcrt-ruby${_Ruby_NODOT_VERSION}-static" )
+ foreach(_Ruby_MSVC_RUNTIME ${_Ruby_POSSIBLE_MSVC_RUNTIMES})
+ foreach(_Ruby_VERSION_SUFFIX ${_Ruby_POSSIBLE_VERSION_SUFFICES})
+ list(APPEND _Ruby_POSSIBLE_LIB_NAMES
+ "${_Ruby_ARCH_PREFIX}${_Ruby_MSVC_RUNTIME}-ruby${_Ruby_VERSION_SUFFIX}"
+ "${_Ruby_ARCH_PREFIX}${_Ruby_MSVC_RUNTIME}-ruby${_Ruby_VERSION_SUFFIX}-static")
+ endforeach()
+ endforeach()
endif()
find_library(Ruby_LIBRARY NAMES ${_Ruby_POSSIBLE_LIB_NAMES} HINTS ${Ruby_POSSIBLE_LIB_DIR} )
diff --git a/Modules/Platform/Android-Determine.cmake b/Modules/Platform/Android-Determine.cmake
index 77e621a..c279086 100644
--- a/Modules/Platform/Android-Determine.cmake
+++ b/Modules/Platform/Android-Determine.cmake
@@ -215,6 +215,14 @@ if(CMAKE_ANDROID_NDK)
# NDK >= 18 has abis.cmake. It provides:
# NDK_KNOWN_DEVICE_ABI32S
# NDK_KNOWN_DEVICE_ABI64S
+ # NDK >= 23 also provides:
+ # NDK_KNOWN_DEVICE_ABIS
+ # NDK_ABI_<abi>_PROC
+ # NDK_ABI_<abi>_ARCH
+ # NDK_ABI_<abi>_TRIPLE
+ # NDK_ABI_<abi>_LLVM_TRIPLE
+ # NDK_PROC_<processor>_ABI
+ # NDK_ARCH_<arch>_ABI
include("${CMAKE_ANDROID_NDK}/build/cmake/abis.cmake" OPTIONAL RESULT_VARIABLE _INCLUDED_ABIS)
endif()
@@ -253,68 +261,75 @@ else()
endif()
if(_INCLUDED_ABIS)
- set(_ANDROID_KNOWN_ABIS ${NDK_KNOWN_DEVICE_ABI32S} ${NDK_KNOWN_DEVICE_ABI64S})
+ if(NDK_KNOWN_DEVICE_ABIS)
+ set(_ANDROID_KNOWN_ABIS ${NDK_KNOWN_DEVICE_ABIS})
+ else()
+ set(_ANDROID_KNOWN_ABIS ${NDK_KNOWN_DEVICE_ABI32S} ${NDK_KNOWN_DEVICE_ABI64S})
+ endif()
endif()
-# https://developer.android.com/ndk/guides/abis.html
-
-set(_ANDROID_ABI_arm64-v8a_PROC "aarch64")
-set(_ANDROID_ABI_arm64-v8a_ARCH "arm64")
-set(_ANDROID_ABI_arm64-v8a_TRIPLE "aarch64-linux-android")
-set(_ANDROID_ABI_arm64-v8a_LLVM_TRIPLE "aarch64-none-linux-android")
-set(_ANDROID_ABI_armeabi-v7a_PROC "armv7-a")
-set(_ANDROID_ABI_armeabi-v7a_ARCH "arm")
-set(_ANDROID_ABI_armeabi-v7a_TRIPLE "arm-linux-androideabi")
-set(_ANDROID_ABI_armeabi-v7a_LLVM_TRIPLE "armv7-none-linux-androideabi")
-set(_ANDROID_ABI_armeabi-v6_PROC "armv6")
-set(_ANDROID_ABI_armeabi-v6_ARCH "arm")
-set(_ANDROID_ABI_armeabi-v6_TRIPLE "arm-linux-androideabi")
-set(_ANDROID_ABI_armeabi-v6_LLVM_TRIPLE "armv6-none-linux-androideabi")
-set(_ANDROID_ABI_armeabi_PROC "armv5te")
-set(_ANDROID_ABI_armeabi_ARCH "arm")
-set(_ANDROID_ABI_armeabi_TRIPLE "arm-linux-androideabi")
-set(_ANDROID_ABI_armeabi_LLVM_TRIPLE "armv5te-none-linux-androideabi")
-set(_ANDROID_ABI_mips_PROC "mips")
-set(_ANDROID_ABI_mips_ARCH "mips")
-set(_ANDROID_ABI_mips_TRIPLE "mipsel-linux-android")
-set(_ANDROID_ABI_mips_LLVM_TRIPLE "mipsel-none-linux-android")
-set(_ANDROID_ABI_mips64_PROC "mips64")
-set(_ANDROID_ABI_mips64_ARCH "mips64")
-set(_ANDROID_ABI_mips64_TRIPLE "mips64el-linux-android")
-set(_ANDROID_ABI_mips64_LLVM_TRIPLE "mips64el-none-linux-android")
-set(_ANDROID_ABI_x86_PROC "i686")
-set(_ANDROID_ABI_x86_ARCH "x86")
-set(_ANDROID_ABI_x86_TRIPLE "i686-linux-android")
-set(_ANDROID_ABI_x86_LLVM_TRIPLE "i686-none-linux-android")
-set(_ANDROID_ABI_x86_64_PROC "x86_64")
-set(_ANDROID_ABI_x86_64_ARCH "x86_64")
-set(_ANDROID_ABI_x86_64_TRIPLE "x86_64-linux-android")
-set(_ANDROID_ABI_x86_64_LLVM_TRIPLE "x86_64-none-linux-android")
-
-set(_ANDROID_PROC_aarch64_ARCH_ABI "arm64-v8a")
-set(_ANDROID_PROC_armv7-a_ARCH_ABI "armeabi-v7a")
-set(_ANDROID_PROC_armv6_ARCH_ABI "armeabi-v6")
-set(_ANDROID_PROC_armv5te_ARCH_ABI "armeabi")
-set(_ANDROID_PROC_i686_ARCH_ABI "x86")
-set(_ANDROID_PROC_mips_ARCH_ABI "mips")
-set(_ANDROID_PROC_mips64_ARCH_ABI "mips64")
-set(_ANDROID_PROC_x86_64_ARCH_ABI "x86_64")
-
-set(_ANDROID_ARCH_arm64_ABI "arm64-v8a")
-set(_ANDROID_ARCH_arm_ABI "armeabi")
-set(_ANDROID_ARCH_mips_ABI "mips")
-set(_ANDROID_ARCH_mips64_ABI "mips64")
-set(_ANDROID_ARCH_x86_ABI "x86")
-set(_ANDROID_ARCH_x86_64_ABI "x86_64")
+if(NOT DEFINED NDK_KNOWN_DEVICE_ABIS)
+ # The NDK is not new enough to provide ABI information.
+ # https://developer.android.com/ndk/guides/abis.html
+
+ set(NDK_ABI_arm64-v8a_PROC "aarch64")
+ set(NDK_ABI_arm64-v8a_ARCH "arm64")
+ set(NDK_ABI_arm64-v8a_TRIPLE "aarch64-linux-android")
+ set(NDK_ABI_arm64-v8a_LLVM_TRIPLE "aarch64-none-linux-android")
+ set(NDK_ABI_armeabi-v7a_PROC "armv7-a")
+ set(NDK_ABI_armeabi-v7a_ARCH "arm")
+ set(NDK_ABI_armeabi-v7a_TRIPLE "arm-linux-androideabi")
+ set(NDK_ABI_armeabi-v7a_LLVM_TRIPLE "armv7-none-linux-androideabi")
+ set(NDK_ABI_armeabi-v6_PROC "armv6")
+ set(NDK_ABI_armeabi-v6_ARCH "arm")
+ set(NDK_ABI_armeabi-v6_TRIPLE "arm-linux-androideabi")
+ set(NDK_ABI_armeabi-v6_LLVM_TRIPLE "armv6-none-linux-androideabi")
+ set(NDK_ABI_armeabi_PROC "armv5te")
+ set(NDK_ABI_armeabi_ARCH "arm")
+ set(NDK_ABI_armeabi_TRIPLE "arm-linux-androideabi")
+ set(NDK_ABI_armeabi_LLVM_TRIPLE "armv5te-none-linux-androideabi")
+ set(NDK_ABI_mips_PROC "mips")
+ set(NDK_ABI_mips_ARCH "mips")
+ set(NDK_ABI_mips_TRIPLE "mipsel-linux-android")
+ set(NDK_ABI_mips_LLVM_TRIPLE "mipsel-none-linux-android")
+ set(NDK_ABI_mips64_PROC "mips64")
+ set(NDK_ABI_mips64_ARCH "mips64")
+ set(NDK_ABI_mips64_TRIPLE "mips64el-linux-android")
+ set(NDK_ABI_mips64_LLVM_TRIPLE "mips64el-none-linux-android")
+ set(NDK_ABI_x86_PROC "i686")
+ set(NDK_ABI_x86_ARCH "x86")
+ set(NDK_ABI_x86_TRIPLE "i686-linux-android")
+ set(NDK_ABI_x86_LLVM_TRIPLE "i686-none-linux-android")
+ set(NDK_ABI_x86_64_PROC "x86_64")
+ set(NDK_ABI_x86_64_ARCH "x86_64")
+ set(NDK_ABI_x86_64_TRIPLE "x86_64-linux-android")
+ set(NDK_ABI_x86_64_LLVM_TRIPLE "x86_64-none-linux-android")
+
+ set(NDK_PROC_aarch64_ABI "arm64-v8a")
+ set(NDK_PROC_armv7-a_ABI "armeabi-v7a")
+ set(NDK_PROC_armv6_ABI "armeabi-v6")
+ set(NDK_PROC_armv5te_ABI "armeabi")
+ set(NDK_PROC_i686_ABI "x86")
+ set(NDK_PROC_mips_ABI "mips")
+ set(NDK_PROC_mips64_ABI "mips64")
+ set(NDK_PROC_x86_64_ABI "x86_64")
+
+ set(NDK_ARCH_arm64_ABI "arm64-v8a")
+ set(NDK_ARCH_arm_ABI "armeabi")
+ set(NDK_ARCH_mips_ABI "mips")
+ set(NDK_ARCH_mips64_ABI "mips64")
+ set(NDK_ARCH_x86_ABI "x86")
+ set(NDK_ARCH_x86_64_ABI "x86_64")
+endif()
# Validate inputs.
-if(CMAKE_ANDROID_ARCH_ABI AND NOT DEFINED "_ANDROID_ABI_${CMAKE_ANDROID_ARCH_ABI}_PROC")
+if(CMAKE_ANDROID_ARCH_ABI AND NOT DEFINED "NDK_ABI_${CMAKE_ANDROID_ARCH_ABI}_PROC")
message(FATAL_ERROR "Android: Unknown ABI CMAKE_ANDROID_ARCH_ABI='${CMAKE_ANDROID_ARCH_ABI}'.")
endif()
-if(CMAKE_SYSTEM_PROCESSOR AND NOT DEFINED "_ANDROID_PROC_${CMAKE_SYSTEM_PROCESSOR}_ARCH_ABI")
+if(CMAKE_SYSTEM_PROCESSOR AND NOT DEFINED "NDK_PROC_${CMAKE_SYSTEM_PROCESSOR}_ABI")
message(FATAL_ERROR "Android: Unknown processor CMAKE_SYSTEM_PROCESSOR='${CMAKE_SYSTEM_PROCESSOR}'.")
endif()
-if(_ANDROID_SYSROOT_ARCH AND NOT DEFINED "_ANDROID_ARCH_${_ANDROID_SYSROOT_ARCH}_ABI")
+if(_ANDROID_SYSROOT_ARCH AND NOT DEFINED "NDK_ARCH_${_ANDROID_SYSROOT_ARCH}_ABI")
message(FATAL_ERROR
"Android: Unknown architecture '${_ANDROID_SYSROOT_ARCH}' specified in CMAKE_SYSROOT:\n"
" ${CMAKE_SYSROOT}"
@@ -324,9 +339,9 @@ endif()
# Select an ABI.
if(NOT CMAKE_ANDROID_ARCH_ABI)
if(CMAKE_SYSTEM_PROCESSOR)
- set(CMAKE_ANDROID_ARCH_ABI "${_ANDROID_PROC_${CMAKE_SYSTEM_PROCESSOR}_ARCH_ABI}")
+ set(CMAKE_ANDROID_ARCH_ABI "${NDK_PROC_${CMAKE_SYSTEM_PROCESSOR}_ABI}")
elseif(_ANDROID_SYSROOT_ARCH)
- set(CMAKE_ANDROID_ARCH_ABI "${_ANDROID_ARCH_${_ANDROID_SYSROOT_ARCH}_ABI}")
+ set(CMAKE_ANDROID_ARCH_ABI "${NDK_ARCH_${_ANDROID_SYSROOT_ARCH}_ABI}")
elseif(_INCLUDED_ABIS)
# Default to the oldest ARM ABI.
foreach(abi armeabi armeabi-v7a arm64-v8a)
@@ -382,7 +397,7 @@ if(_INCLUDED_ABIS AND NOT CMAKE_ANDROID_ARCH_ABI IN_LIST _ANDROID_KNOWN_ABIS)
"Supported ABIS: ${_ANDROID_KNOWN_ABIS}."
)
endif()
-set(CMAKE_ANDROID_ARCH "${_ANDROID_ABI_${CMAKE_ANDROID_ARCH_ABI}_ARCH}")
+set(CMAKE_ANDROID_ARCH "${NDK_ABI_${CMAKE_ANDROID_ARCH_ABI}_ARCH}")
if(_ANDROID_SYSROOT_ARCH AND NOT "x${_ANDROID_SYSROOT_ARCH}" STREQUAL "x${CMAKE_ANDROID_ARCH}")
message(FATAL_ERROR
"Android: Architecture '${_ANDROID_SYSROOT_ARCH}' specified in CMAKE_SYSROOT:\n"
@@ -390,17 +405,17 @@ if(_ANDROID_SYSROOT_ARCH AND NOT "x${_ANDROID_SYSROOT_ARCH}" STREQUAL "x${CMAKE_
"does not match architecture '${CMAKE_ANDROID_ARCH}' for the ABI '${CMAKE_ANDROID_ARCH_ABI}'."
)
endif()
-set(CMAKE_ANDROID_ARCH_TRIPLE "${_ANDROID_ABI_${CMAKE_ANDROID_ARCH_ABI}_TRIPLE}")
+set(CMAKE_ANDROID_ARCH_TRIPLE "${NDK_ABI_${CMAKE_ANDROID_ARCH_ABI}_TRIPLE}")
set(CMAKE_ANDROID_ARCH_LLVM_TRIPLE
- "${_ANDROID_ABI_${CMAKE_ANDROID_ARCH_ABI}_LLVM_TRIPLE}")
+ "${NDK_ABI_${CMAKE_ANDROID_ARCH_ABI}_LLVM_TRIPLE}")
# Select a processor.
if(NOT CMAKE_SYSTEM_PROCESSOR)
- set(CMAKE_SYSTEM_PROCESSOR "${_ANDROID_ABI_${CMAKE_ANDROID_ARCH_ABI}_PROC}")
+ set(CMAKE_SYSTEM_PROCESSOR "${NDK_ABI_${CMAKE_ANDROID_ARCH_ABI}_PROC}")
endif()
# If the user specified both an ABI and a processor then they might not match.
-if(NOT _ANDROID_ABI_${CMAKE_ANDROID_ARCH_ABI}_PROC STREQUAL CMAKE_SYSTEM_PROCESSOR)
+if(NOT NDK_ABI_${CMAKE_ANDROID_ARCH_ABI}_PROC STREQUAL CMAKE_SYSTEM_PROCESSOR)
message(FATAL_ERROR "Android: The specified CMAKE_ANDROID_ARCH_ABI='${CMAKE_ANDROID_ARCH_ABI}' and CMAKE_SYSTEM_PROCESSOR='${CMAKE_SYSTEM_PROCESSOR}' is not a valid combination.")
endif()