From fcfa6665a94f670e1eb73cb89b20022602abcc99 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 25 Sep 2019 04:28:20 +0100 Subject: 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. --- contrib/depends/toolchain.cmake.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'contrib/depends/toolchain.cmake.in') 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() -- cgit v1.2.3