mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-29 18:53:14 +00:00
Don't set ARCH_ID if it's already set
Usually it's unset, but depends toolchain files set it explicitly for cross-compiling. Don't override preset values. But make sure it's set for all x86 / x86_64 builds, not just Linux. Also make sure -std=c++11 is set for Darwin builds, not all submodules were getting it consistently before.
This commit is contained in:
parent
faf5805fc0
commit
fcfa6665a9
2 changed files with 8 additions and 4 deletions
|
@ -118,6 +118,7 @@ string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
|
||||||
# when ARCH is not set to an explicit identifier, cmake's builtin is used
|
# when ARCH is not set to an explicit identifier, cmake's builtin is used
|
||||||
# to identify the target architecture, to direct logic in this cmake script.
|
# to identify the target architecture, to direct logic in this cmake script.
|
||||||
# Since ARCH is a cached variable, it will not be set on first cmake invocation.
|
# Since ARCH is a cached variable, it will not be set on first cmake invocation.
|
||||||
|
if (NOT ARCH_ID)
|
||||||
if (NOT ARCH OR ARCH STREQUAL "" OR ARCH STREQUAL "native" OR ARCH STREQUAL "default")
|
if (NOT ARCH OR ARCH STREQUAL "" OR ARCH STREQUAL "native" OR ARCH STREQUAL "default")
|
||||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "")
|
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "")
|
||||||
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||||
|
@ -126,6 +127,7 @@ if (NOT ARCH OR ARCH STREQUAL "" OR ARCH STREQUAL "native" OR ARCH STREQUAL "def
|
||||||
else()
|
else()
|
||||||
set(ARCH_ID "${ARCH}")
|
set(ARCH_ID "${ARCH}")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
string(TOLOWER "${ARCH_ID}" ARM_ID)
|
string(TOLOWER "${ARCH_ID}" ARM_ID)
|
||||||
string(SUBSTRING "${ARM_ID}" 0 3 ARM_TEST)
|
string(SUBSTRING "${ARM_ID}" 0 3 ARM_TEST)
|
||||||
if (ARM_TEST STREQUAL "arm")
|
if (ARM_TEST STREQUAL "arm")
|
||||||
|
@ -414,7 +416,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "(SunOS|Solaris)")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (APPLE AND NOT IOS)
|
if (APPLE AND NOT IOS)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default -std=c++11")
|
||||||
if (NOT OpenSSL_DIR)
|
if (NOT OpenSSL_DIR)
|
||||||
EXECUTE_PROCESS(COMMAND brew --prefix openssl
|
EXECUTE_PROCESS(COMMAND brew --prefix openssl
|
||||||
OUTPUT_VARIABLE OPENSSL_ROOT_DIR
|
OUTPUT_VARIABLE OPENSSL_ROOT_DIR
|
||||||
|
|
|
@ -104,12 +104,14 @@ if(ARCHITECTURE STREQUAL "riscv64")
|
||||||
set(ARCH "rv64imafdc")
|
set(ARCH "rv64imafdc")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ARCHITECTURE STREQUAL "i686" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if(ARCHITECTURE STREQUAL "i686")
|
||||||
SET(LINUX_32 ON)
|
|
||||||
SET(ARCH_ID "i386")
|
SET(ARCH_ID "i386")
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
SET(LINUX_32 ON)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ARCHITECTURE STREQUAL "x86_64" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if(ARCHITECTURE STREQUAL "x86_64")
|
||||||
SET(ARCH_ID "x86_64")
|
SET(ARCH_ID "x86_64")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue