diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-09-25 15:45:55 -0400 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-09-25 15:45:56 -0400 |
commit | 1b23c05299da72a0e7c3c7981887f9f5e55e2fac (patch) | |
tree | 147b732415efa2cdf66c39aa1d3d4813d53b7519 | |
parent | Merge pull request #5929 (diff) | |
parent | Don't set ARCH_ID if it's already set (diff) | |
download | monero-1b23c05299da72a0e7c3c7981887f9f5e55e2fac.tar.xz |
Merge pull request #5930
fcfa6665 Don't set ARCH_ID if it's already set (Howard Chu)
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | contrib/depends/toolchain.cmake.in | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b4cc80d3..8f4364b8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 # 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. +if (NOT ARCH_ID) if (NOT ARCH OR ARCH STREQUAL "" OR ARCH STREQUAL "native" OR ARCH STREQUAL "default") if(CMAKE_SYSTEM_PROCESSOR STREQUAL "") 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() set(ARCH_ID "${ARCH}") endif() +endif() string(TOLOWER "${ARCH_ID}" ARM_ID) string(SUBSTRING "${ARM_ID}" 0 3 ARM_TEST) if (ARM_TEST STREQUAL "arm") @@ -414,7 +416,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "(SunOS|Solaris)") endif () 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) EXECUTE_PROCESS(COMMAND brew --prefix openssl OUTPUT_VARIABLE OPENSSL_ROOT_DIR diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in index 3be748ae7..ebe96b69c 100644 --- a/contrib/depends/toolchain.cmake.in +++ b/contrib/depends/toolchain.cmake.in @@ -104,12 +104,14 @@ if(ARCHITECTURE STREQUAL "riscv64") set(ARCH "rv64imafdc") endif() -if(ARCHITECTURE STREQUAL "i686" AND CMAKE_SYSTEM_NAME STREQUAL "Linux") - SET(LINUX_32 ON) +if(ARCHITECTURE STREQUAL "i686") SET(ARCH_ID "i386") + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + SET(LINUX_32 ON) + endif() endif() -if(ARCHITECTURE STREQUAL "x86_64" AND CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(ARCHITECTURE STREQUAL "x86_64") SET(ARCH_ID "x86_64") endif() |