summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-21 12:42:38 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-04-21 12:43:43 (GMT)
commit2b7aecba1663f86148b8c2f1033cfcbd87453ad3 (patch)
treed13754063e6795fcbab8f492dbf69fe7dcdf36a2 /Modules
parent1b0c7bca5ede6eb3965cb23471c6530a08d0d2d5 (diff)
parent0903531964cff8888dd1cbf2a9c82ac6bb9a522f (diff)
downloadCMake-2b7aecba1663f86148b8c2f1033cfcbd87453ad3.zip
CMake-2b7aecba1663f86148b8c2f1033cfcbd87453ad3.tar.gz
CMake-2b7aecba1663f86148b8c2f1033cfcbd87453ad3.tar.bz2
Merge topic 'autogen-fixes'
09035319 Autogen: Pass explicit predefines header to moc if possible Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !671
Diffstat (limited to 'Modules')
-rw-r--r--Modules/AutogenInfo.cmake.in1
-rw-r--r--Modules/Compiler/Intel.cmake2
-rw-r--r--Modules/Platform/Linux-GNU.cmake1
3 files changed, 4 insertions, 0 deletions
diff --git a/Modules/AutogenInfo.cmake.in b/Modules/AutogenInfo.cmake.in
index fcecb6c..5e945bc 100644
--- a/Modules/AutogenInfo.cmake.in
+++ b/Modules/AutogenInfo.cmake.in
@@ -21,6 +21,7 @@ set(AM_MOC_INCLUDES @_moc_incs@)
set(AM_MOC_OPTIONS @_moc_options@)
set(AM_MOC_RELAXED_MODE @_moc_relaxed_mode@)
set(AM_MOC_DEPEND_FILTERS @_moc_depend_filters@)
+set(AM_MOC_PREDEFS_CMD @_moc_predefs_cmd@)
# UIC settings
set(AM_UIC_SKIP @_uic_skip@)
set(AM_UIC_TARGET_OPTIONS @_uic_target_options@)
diff --git a/Modules/Compiler/Intel.cmake b/Modules/Compiler/Intel.cmake
index 02968b4..06d01f1 100644
--- a/Modules/Compiler/Intel.cmake
+++ b/Modules/Compiler/Intel.cmake
@@ -22,5 +22,7 @@ else()
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
+
+ set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}" "-QdM" "-P" "-Za" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
endmacro()
endif()
diff --git a/Modules/Platform/Linux-GNU.cmake b/Modules/Platform/Linux-GNU.cmake
index 6878254..ce30a26 100644
--- a/Modules/Platform/Linux-GNU.cmake
+++ b/Modules/Platform/Linux-GNU.cmake
@@ -12,4 +12,5 @@ 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()