summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-04-19 12:23:48 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-04-19 12:23:52 (GMT)
commitc4a2059eae1473db68fad8980d15d8200cc3e739 (patch)
treebf47fea3d8b559fe62d5f273e52d5233cf41e5b5 /Modules
parent3c6388553aef091556b64daf9bcb6f64fbdcdba2 (diff)
parentd67962c55a4be2653d40b27c4f5fc38fc5c223b0 (diff)
downloadCMake-c4a2059eae1473db68fad8980d15d8200cc3e739.zip
CMake-c4a2059eae1473db68fad8980d15d8200cc3e739.tar.gz
CMake-c4a2059eae1473db68fad8980d15d8200cc3e739.tar.bz2
Merge topic 'depfile-flag'
d67962c55a SunPro,XL: Add depfile flags to support Ninja generator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1969
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/SunPro-C.cmake2
-rw-r--r--Modules/Compiler/SunPro-CXX.cmake2
-rw-r--r--Modules/Compiler/XL.cmake2
3 files changed, 6 insertions, 0 deletions
diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake
index 29c2f22..8d0e6d6 100644
--- a/Modules/Compiler/SunPro-C.cmake
+++ b/Modules/Compiler/SunPro-C.cmake
@@ -18,6 +18,8 @@ string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
+set(CMAKE_DEPFILE_FLAGS_C "-xMD -xMF <DEPFILE>")
+
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake
index 5cb7edc..14196b7 100644
--- a/Modules/Compiler/SunPro-CXX.cmake
+++ b/Modules/Compiler/SunPro-CXX.cmake
@@ -18,6 +18,8 @@ string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -xO2 -xspace -DNDEBUG")
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -xO3 -DNDEBUG")
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -g -xO2 -DNDEBUG")
+set(CMAKE_DEPFILE_FLAGS_CXX "-xMD -xMF <DEPFILE>")
+
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
diff --git a/Modules/Compiler/XL.cmake b/Modules/Compiler/XL.cmake
index e527a04..3361f8f 100644
--- a/Modules/Compiler/XL.cmake
+++ b/Modules/Compiler/XL.cmake
@@ -30,6 +30,8 @@ macro(__compiler_xl lang)
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+ set(CMAKE_DEPFILE_FLAGS_${lang} "-MF <DEPFILE> -qmakedep=gcc")
+
# CMAKE_XL_CreateExportList is part of the AIX XL compilers but not the linux ones.
# If we found the tool, we'll use it to create exports, otherwise stick with the regular
# create shared library compile line.