From 0c7951a9397f4703d61d346c64c27a99a30f4dac Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 2 Jun 2016 09:47:29 -0400 Subject: cmLocalGenerator: Consolidate conditions in AddArchitectureFlags Make room for possible future non-Apple architecture flags. --- Source/cmLocalGenerator.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index e91eb46..b748b9c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1475,11 +1475,7 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags, const std::string& config) { // Only add Mac OS X specific flags on Darwin platforms (OSX and iphone): - if (!this->Makefile->IsOn("APPLE")) { - return; - } - - if (this->EmitUniversalBinaryFlags) { + if (this->Makefile->IsOn("APPLE") && this->EmitUniversalBinaryFlags) { std::vector archs; target->GetAppleArchs(config, archs); const char* sysroot = this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT"); -- cgit v0.12 From f6c21894952fb07e50e511efaa3baded794d631f Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 26 May 2016 14:41:23 -0400 Subject: Modules: Rename internal platform-specific compiler determination modules Rename Modules/Platform/-.cmake files to Modules/Platform/-Determine-.cmake to clarify their role. For compatibility with user-provided modules, load the old names if they exist. --- Modules/CMakeDetermineCCompiler.cmake | 1 + Modules/CMakeDetermineCXXCompiler.cmake | 1 + Modules/CMakeDetermineFortranCompiler.cmake | 1 + Modules/Platform/CYGWIN-CXX.cmake | 7 ------- Modules/Platform/CYGWIN-Determine-CXX.cmake | 7 +++++++ Modules/Platform/Darwin-CXX.cmake | 7 ------- Modules/Platform/Darwin-Determine-CXX.cmake | 7 +++++++ Modules/Platform/Linux-CXX.cmake | 3 --- Modules/Platform/Linux-Determine-CXX.cmake | 3 +++ Modules/Platform/Windows-CXX.cmake | 7 ------- Modules/Platform/Windows-Determine-CXX.cmake | 7 +++++++ 11 files changed, 27 insertions(+), 24 deletions(-) delete mode 100644 Modules/Platform/CYGWIN-CXX.cmake create mode 100644 Modules/Platform/CYGWIN-Determine-CXX.cmake delete mode 100644 Modules/Platform/Darwin-CXX.cmake create mode 100644 Modules/Platform/Darwin-Determine-CXX.cmake delete mode 100644 Modules/Platform/Linux-CXX.cmake create mode 100644 Modules/Platform/Linux-Determine-CXX.cmake delete mode 100644 Modules/Platform/Windows-CXX.cmake create mode 100644 Modules/Platform/Windows-Determine-CXX.cmake diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index f8c6303..73d9fb3 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -34,6 +34,7 @@ include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake) # Load system-specific compiler preferences for this language. +include(Platform/${CMAKE_SYSTEM_NAME}-Determine-C OPTIONAL) include(Platform/${CMAKE_SYSTEM_NAME}-C OPTIONAL) if(NOT CMAKE_C_COMPILER_NAMES) set(CMAKE_C_COMPILER_NAMES cc) diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 3c9bbc2..063b68e 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -33,6 +33,7 @@ include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake) # Load system-specific compiler preferences for this language. +include(Platform/${CMAKE_SYSTEM_NAME}-Determine-CXX OPTIONAL) include(Platform/${CMAKE_SYSTEM_NAME}-CXX OPTIONAL) if(NOT CMAKE_CXX_COMPILER_NAMES) set(CMAKE_CXX_COMPILER_NAMES CC) diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index 4f2a70c..0f27a78 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -20,6 +20,7 @@ # as a default compiler include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake) +include(Platform/${CMAKE_SYSTEM_NAME}-Determine-Fortran OPTIONAL) include(Platform/${CMAKE_SYSTEM_NAME}-Fortran OPTIONAL) if(NOT CMAKE_Fortran_COMPILER_NAMES) set(CMAKE_Fortran_COMPILER_NAMES f95) diff --git a/Modules/Platform/CYGWIN-CXX.cmake b/Modules/Platform/CYGWIN-CXX.cmake deleted file mode 100644 index bf37f79..0000000 --- a/Modules/Platform/CYGWIN-CXX.cmake +++ /dev/null @@ -1,7 +0,0 @@ -if(NOT CMAKE_CXX_COMPILER_NAMES) - set(CMAKE_CXX_COMPILER_NAMES c++) -endif() - -# Exclude C++ compilers differing from C compiler only by case -# because this platform may have a case-insensitive filesystem. -set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC) diff --git a/Modules/Platform/CYGWIN-Determine-CXX.cmake b/Modules/Platform/CYGWIN-Determine-CXX.cmake new file mode 100644 index 0000000..bf37f79 --- /dev/null +++ b/Modules/Platform/CYGWIN-Determine-CXX.cmake @@ -0,0 +1,7 @@ +if(NOT CMAKE_CXX_COMPILER_NAMES) + set(CMAKE_CXX_COMPILER_NAMES c++) +endif() + +# Exclude C++ compilers differing from C compiler only by case +# because this platform may have a case-insensitive filesystem. +set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC) diff --git a/Modules/Platform/Darwin-CXX.cmake b/Modules/Platform/Darwin-CXX.cmake deleted file mode 100644 index bf37f79..0000000 --- a/Modules/Platform/Darwin-CXX.cmake +++ /dev/null @@ -1,7 +0,0 @@ -if(NOT CMAKE_CXX_COMPILER_NAMES) - set(CMAKE_CXX_COMPILER_NAMES c++) -endif() - -# Exclude C++ compilers differing from C compiler only by case -# because this platform may have a case-insensitive filesystem. -set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC) diff --git a/Modules/Platform/Darwin-Determine-CXX.cmake b/Modules/Platform/Darwin-Determine-CXX.cmake new file mode 100644 index 0000000..bf37f79 --- /dev/null +++ b/Modules/Platform/Darwin-Determine-CXX.cmake @@ -0,0 +1,7 @@ +if(NOT CMAKE_CXX_COMPILER_NAMES) + set(CMAKE_CXX_COMPILER_NAMES c++) +endif() + +# Exclude C++ compilers differing from C compiler only by case +# because this platform may have a case-insensitive filesystem. +set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC) diff --git a/Modules/Platform/Linux-CXX.cmake b/Modules/Platform/Linux-CXX.cmake deleted file mode 100644 index b594dae..0000000 --- a/Modules/Platform/Linux-CXX.cmake +++ /dev/null @@ -1,3 +0,0 @@ -if(NOT CMAKE_CXX_COMPILER_NAMES) - set(CMAKE_CXX_COMPILER_NAMES c++) -endif() diff --git a/Modules/Platform/Linux-Determine-CXX.cmake b/Modules/Platform/Linux-Determine-CXX.cmake new file mode 100644 index 0000000..b594dae --- /dev/null +++ b/Modules/Platform/Linux-Determine-CXX.cmake @@ -0,0 +1,3 @@ +if(NOT CMAKE_CXX_COMPILER_NAMES) + set(CMAKE_CXX_COMPILER_NAMES c++) +endif() diff --git a/Modules/Platform/Windows-CXX.cmake b/Modules/Platform/Windows-CXX.cmake deleted file mode 100644 index bf37f79..0000000 --- a/Modules/Platform/Windows-CXX.cmake +++ /dev/null @@ -1,7 +0,0 @@ -if(NOT CMAKE_CXX_COMPILER_NAMES) - set(CMAKE_CXX_COMPILER_NAMES c++) -endif() - -# Exclude C++ compilers differing from C compiler only by case -# because this platform may have a case-insensitive filesystem. -set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC) diff --git a/Modules/Platform/Windows-Determine-CXX.cmake b/Modules/Platform/Windows-Determine-CXX.cmake new file mode 100644 index 0000000..bf37f79 --- /dev/null +++ b/Modules/Platform/Windows-Determine-CXX.cmake @@ -0,0 +1,7 @@ +if(NOT CMAKE_CXX_COMPILER_NAMES) + set(CMAKE_CXX_COMPILER_NAMES c++) +endif() + +# Exclude C++ compilers differing from C compiler only by case +# because this platform may have a case-insensitive filesystem. +set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC) -- cgit v0.12