diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index d96268869c1808cb02b4f5ded73e8a0d97e94c77..a3ef2bc681058efcf21345efae6d2baf1aff7d84 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -86,4 +86,6 @@ macro(__compiler_gnu lang) "\"${CMAKE_${lang}_COMPILER_RANLIB}\" " ) 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 ce30a26a576b8a4b1c2f58b1db73da108e13fcf5..6878254ee1b5aad36479e91da84dce83fa906e50 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()