diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-10-18 16:11:27 +0200 |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-11-29 15:25:42 +0100 |
commit | 2c71d051facad13b0a42a57066be2489d5fff6ea (patch) | |
tree | d07f850f8abc74d9df34ad885681c08d36c14472 /Modules/CMakeDetermineCompilerId.cmake | |
parent | afd0f6785dc1220a07743d31699fcd9097cca46a (diff) | |
download | cmake-2c71d051facad13b0a42a57066be2489d5fff6ea.tar.gz |
Makefiles Generators: use compiler for dependencies generation
Each source compilation generates a dependencies file. These dependencies
files are consolidated in one file per target. This consolidation is done
as part of command 'cmake -E cmake_depends` launched before evaluation of
makefile dependency graph.
The consolidation uses the same approach as `CMake` dependencies management.
Fixes: #21321
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index a982d2cd28..33ac07e73d 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -152,7 +152,10 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) set(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE INTERNAL "Executable file format") endif() - if(CMAKE_GENERATOR MATCHES "^Ninja" AND MSVC_${lang}_ARCHITECTURE_ID) + if((CMAKE_GENERATOR MATCHES "^Ninja" + OR ((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER) + AND CMAKE_GENERATOR MATCHES "Makefiles|WMake")) + AND MSVC_${lang}_ARCHITECTURE_ID) foreach(userflags "${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}" "") CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX(${lang} "${userflags}") endforeach() |