summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-06-04 13:51:24 +0000
committerKitware Robot <kwrobot@kitware.com>2018-06-04 09:51:31 -0400
commitfbd34ecd3564ca981acfa6b6755c9901ce621b68 (patch)
tree9853470f23451fd3e613ee71beee71ff71410037
parent003c30fa1867c90b0c1cd8e5c87a17c276d1756a (diff)
parentcaa138c1a50ce3a1617c413aedaff057c19a70f9 (diff)
downloadcmake-fbd34ecd3564ca981acfa6b6755c9901ce621b68.tar.gz
Merge topic 'gnu-CMAKE_LANG_COMPILER_PREDEFINES_COMMAND'
caa138c1a5 Move GNU COMPILER_PREDEFINES_COMMAND from Platform to Compiler Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2121
-rw-r--r--Modules/Compiler/GNU.cmake2
-rw-r--r--Modules/Platform/Linux-GNU.cmake1
2 files changed, 2 insertions, 1 deletions
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index d96268869c..a3ef2bc681 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()
diff --git a/Modules/Platform/Linux-GNU.cmake b/Modules/Platform/Linux-GNU.cmake
index ce30a26a57..6878254ee1 100644
--- a/Modules/Platform/Linux-GNU.cmake
+++ b/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()