summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2018-06-01 07:21:06 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2018-06-01 07:21:06 (GMT)
commitcaa138c1a50ce3a1617c413aedaff057c19a70f9 (patch)
tree9a1d74e0bc63d779f60b46f92aeb5c97b4f42c53 /Modules/Compiler
parent629287304565de8711b9fa6982bdf83c3f443e55 (diff)
downloadCMake-caa138c1a50ce3a1617c413aedaff057c19a70f9.zip
CMake-caa138c1a50ce3a1617c413aedaff057c19a70f9.tar.gz
CMake-caa138c1a50ce3a1617c413aedaff057c19a70f9.tar.bz2
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).
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/GNU.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index d962688..a3ef2bc 100644
--- a/Modules/Compiler/GNU.cmake
+++ b/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()