Explorar el Código

Merge topic 'minor-cleanups'

f6c21894 Modules: Rename internal platform-specific compiler determination modules
0c7951a9 cmLocalGenerator: Consolidate conditions in AddArchitectureFlags
Brad King hace 9 años
padre
commit
0663dbf133

+ 1 - 0
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)

+ 1 - 0
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)

+ 1 - 0
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)

+ 0 - 0
Modules/Platform/CYGWIN-CXX.cmake → Modules/Platform/CYGWIN-Determine-CXX.cmake


+ 0 - 0
Modules/Platform/Darwin-CXX.cmake → Modules/Platform/Darwin-Determine-CXX.cmake


+ 0 - 0
Modules/Platform/Linux-CXX.cmake → Modules/Platform/Linux-Determine-CXX.cmake


+ 0 - 0
Modules/Platform/Windows-CXX.cmake → Modules/Platform/Windows-Determine-CXX.cmake


+ 1 - 5
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<std::string> archs;
     target->GetAppleArchs(config, archs);
     const char* sysroot = this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT");