Prechádzať zdrojové kódy

Move GNU COMPILER_PREDEFINES_COMMAND from Platform to Compiler

Moves `CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND` from linux specific
[Modules/Platform/Linux-GNU.cmake](Modules/Platform/Linux-GNU.cmake) to
[Modules/Compiler/GNU.cmake](Modules/Compiler/GNU.cmake).
This enables compiler predefines generation (in AUTOMOC) on all
platforms that run gcc (and clang).
Sebastian Holtermann 7 rokov pred
rodič
commit
caa138c1a5

+ 2 - 0
Modules/Compiler/GNU.cmake

@@ -86,4 +86,6 @@ macro(__compiler_gnu lang)
       "\"${CMAKE_${lang}_COMPILER_RANLIB}\" <TARGET>"
     )
   endif()
+
+  set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}" "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
 endmacro()

+ 0 - 1
Modules/Platform/Linux-GNU.cmake

@@ -12,5 +12,4 @@ macro(__linux_compiler_gnu lang)
   # We pass this for historical reasons.  Projects may have
   # executables that use dlopen but do not set ENABLE_EXPORTS.
   set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-rdynamic")
-  set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}" "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
 endmacro()