mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 03:34:13 +08:00
mdbx-cmake: set X86_32/X86_64/ARM/MIPS for Windows and Android.
This commit is contained in:
parent
8833dc6871
commit
cd616447da
@ -203,9 +203,38 @@ endif()
|
|||||||
|
|
||||||
if(NOT CMAKE_SYSTEM_ARCH)
|
if(NOT CMAKE_SYSTEM_ARCH)
|
||||||
if(CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_ARCHITECTURE_ID)
|
if(CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_ARCHITECTURE_ID)
|
||||||
set(CMAKE_SYSTEM_ARCH "${CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_ARCHITECTURE_ID}")
|
string(TOLOWER "${CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_ARCHITECTURE_ID}" CMAKE_SYSTEM_ARCH)
|
||||||
|
if(CMAKE_SYSTEM_ARCH STREQUAL "x86")
|
||||||
|
set(X86_32 TRUE)
|
||||||
|
elseif(CMAKE_SYSTEM_ARCH STREQUAL "x86_64" OR CMAKE_SYSTEM_ARCH STREQUAL "x64")
|
||||||
|
set(X86_64 TRUE)
|
||||||
|
set(CMAKE_SYSTEM_ARCH "x86_64")
|
||||||
|
elseif(CMAKE_SYSTEM_ARCH MATCHES "^(aarch.*|arm.*)")
|
||||||
|
if(CMAKE_TARGET_BITNESS EQUAL 64)
|
||||||
|
set(AARCH64 TRUE)
|
||||||
|
else()
|
||||||
|
set(ARM32 TRUE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
elseif(CMAKE_ANDROID_ARCH_ABI)
|
elseif(CMAKE_ANDROID_ARCH_ABI)
|
||||||
set(CMAKE_SYSTEM_ARCH "${CMAKE_ANDROID_ARCH_ABI}")
|
set(CMAKE_SYSTEM_ARCH "${CMAKE_ANDROID_ARCH_ABI}")
|
||||||
|
if(CMAKE_SYSTEM_ARCH STREQUAL "x86")
|
||||||
|
set(X86_32 TRUE)
|
||||||
|
elseif(CMAKE_SYSTEM_ARCH STREQUAL "x86_64")
|
||||||
|
set(X86_64 TRUE)
|
||||||
|
elseif(CMAKE_SYSTEM_ARCH MATCHES "^(aarch.*|AARCH.*|arm.*|ARM.*)")
|
||||||
|
if(CMAKE_TARGET_BITNESS EQUAL 64)
|
||||||
|
set(AARCH64 TRUE)
|
||||||
|
else()
|
||||||
|
set(ARM32 TRUE)
|
||||||
|
endif()
|
||||||
|
elseif(CMAKE_SYSTEM_ARCH MATCHES "^(mips|MIPS).*")
|
||||||
|
if(CMAKE_TARGET_BITNESS EQUAL 64)
|
||||||
|
set(MIPS64 TRUE)
|
||||||
|
else()
|
||||||
|
set(MIPS32 TRUE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
elseif(CMAKE_COMPILER_IS_ELBRUSC OR CMAKE_COMPILER_IS_ELBRUSCXX
|
elseif(CMAKE_COMPILER_IS_ELBRUSC OR CMAKE_COMPILER_IS_ELBRUSCXX
|
||||||
OR CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_ID STREQUAL "LCC"
|
OR CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_ID STREQUAL "LCC"
|
||||||
OR CMAKE_SYSTEM_PROCESSOR MATCHES "e2k.*|E2K.*|elbrus.*|ELBRUS.*")
|
OR CMAKE_SYSTEM_PROCESSOR MATCHES "e2k.*|E2K.*|elbrus.*|ELBRUS.*")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user