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:
Howard Chu 2019-09-25 04:28:20 +01:00
parent faf5805fc0
commit fcfa6665a9
No known key found for this signature in database
GPG key ID: FD2A70B44AB11BA7
2 changed files with 8 additions and 4 deletions

View file

@ -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()