summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Intel-C.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-30 18:26:34 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-11-30 18:26:53 (GMT)
commita24a4e18af1d40d6bf81045c5955aa08b5e51797 (patch)
treec47b8503b8bb1bee24bb481dcad4281b82208565 /Modules/Compiler/Intel-C.cmake
parent0173cdcc012945901190e883283adfbbba61f491 (diff)
parent2c71d051facad13b0a42a57066be2489d5fff6ea (diff)
downloadCMake-a24a4e18af1d40d6bf81045c5955aa08b5e51797.zip
CMake-a24a4e18af1d40d6bf81045c5955aa08b5e51797.tar.gz
CMake-a24a4e18af1d40d6bf81045c5955aa08b5e51797.tar.bz2
Merge topic 'makefiles-compiler-deps-optims'
2c71d051fa Makefiles Generators: use compiler for dependencies generation afd0f6785d Refactoring: Abstract Makefile line continuation format b6068ce407 Refactoring: enhance include file filtering 3401403f69 Refactoring: Introduce place-holder for dependency target. a97c41bf8b Refactoring: Makefiles Generators: Add support for various depends scanners Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !5528
Diffstat (limited to 'Modules/Compiler/Intel-C.cmake')
-rw-r--r--Modules/Compiler/Intel-C.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake
index ec3bfd8..a7c71bd 100644
--- a/Modules/Compiler/Intel-C.cmake
+++ b/Modules/Compiler/Intel-C.cmake
@@ -5,7 +5,13 @@ string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG")
-set(CMAKE_DEPFILE_FLAGS_C "-MD -MT <OBJECT> -MF <DEPFILE>")
+set(CMAKE_DEPFILE_FLAGS_C "-MD -MT <DEP_TARGET> -MF <DEP_FILE>")
+if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
+ AND CMAKE_GENERATOR MATCHES "Makefiles|WMake")
+ # dependencies are computed by the compiler itself
+ set(CMAKE_C_DEPFILE_FORMAT gcc)
+ set(CMAKE_C_DEPENDS_USE_COMPILER TRUE)
+endif()
if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")