apple silicon target
- move rpi4 detection to Linux - set(_gmp_build_tgt aarch64) for Apple Silicon
This commit is contained in:
parent
d01f6b8d45
commit
d780b33a16
13
deps/GMP/GMP.cmake
vendored
13
deps/GMP/GMP.cmake
vendored
@ -19,15 +19,18 @@ if (MSVC)
|
|||||||
else ()
|
else ()
|
||||||
set(_gmp_ccflags "-O2 -DNDEBUG -fPIC -DPIC -Wall -Wmissing-prototypes -Wpointer-arith -pedantic -fomit-frame-pointer -fno-common")
|
set(_gmp_ccflags "-O2 -DNDEBUG -fPIC -DPIC -Wall -Wmissing-prototypes -Wpointer-arith -pedantic -fomit-frame-pointer -fno-common")
|
||||||
set(_gmp_build_tgt "${CMAKE_SYSTEM_PROCESSOR}")
|
set(_gmp_build_tgt "${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
|
||||||
|
set(_gmp_build_tgt aarch64)
|
||||||
|
endif()
|
||||||
|
set(_gmp_ccflags "${_gmp_ccflags} -mmacosx-version-min=${DEP_OSX_TARGET}")
|
||||||
|
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-apple-darwin")
|
||||||
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
|
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
|
||||||
set(_gmp_ccflags "${_gmp_ccflags} -march=armv7-a") # Works on RPi-4
|
set(_gmp_ccflags "${_gmp_ccflags} -march=armv7-a") # Works on RPi-4
|
||||||
set(_gmp_build_tgt armv7)
|
set(_gmp_build_tgt armv7)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
set(_gmp_ccflags "${_gmp_ccflags} -mmacosx-version-min=${DEP_OSX_TARGET}")
|
|
||||||
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-apple-darwin")
|
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
||||||
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-pc-linux-gnu")
|
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-pc-linux-gnu")
|
||||||
else ()
|
else ()
|
||||||
set(_gmp_build_tgt "") # let it guess
|
set(_gmp_build_tgt "") # let it guess
|
||||||
|
Loading…
Reference in New Issue
Block a user