From 94f1bbdd54841ac8696f14d9e3d2b5362b8f5980 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 9 Feb 2022 10:01:04 -0500 Subject: Intel: Add dependencies on system header files on Windows In commit a624a3e1b3 (Ninja: Use deps=gcc for Intel Compiler on Windows, 2019-01-30, v3.14.0-rc1~30^2) we forgot to account for commit 6d74e7870b (Ninja: Add dependencies on system-provided header files, 2016-03-15, v3.6.0-rc1~265^2). --- Modules/Platform/Windows-Intel-C.cmake | 2 +- Modules/Platform/Windows-Intel-CXX.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Platform/Windows-Intel-C.cmake b/Modules/Platform/Windows-Intel-C.cmake index 152b27c..e4d9b93 100644 --- a/Modules/Platform/Windows-Intel-C.cmake +++ b/Modules/Platform/Windows-Intel-C.cmake @@ -1,7 +1,7 @@ include(Platform/Windows-Intel) __windows_compiler_intel(C) -set(CMAKE_DEPFILE_FLAGS_C "-QMMD -QMT -QMF ") +set(CMAKE_DEPFILE_FLAGS_C "-QMD -QMT -QMF ") set(CMAKE_C_DEPFILE_FORMAT gcc) if(CMAKE_GENERATOR MATCHES "^Ninja") diff --git a/Modules/Platform/Windows-Intel-CXX.cmake b/Modules/Platform/Windows-Intel-CXX.cmake index ce33ae1..6adbb6e 100644 --- a/Modules/Platform/Windows-Intel-CXX.cmake +++ b/Modules/Platform/Windows-Intel-CXX.cmake @@ -2,7 +2,7 @@ include(Platform/Windows-Intel) set(_COMPILE_CXX " /TP") __windows_compiler_intel(CXX) -set(CMAKE_DEPFILE_FLAGS_CXX "-QMMD -QMT -QMF ") +set(CMAKE_DEPFILE_FLAGS_CXX "-QMD -QMT -QMF ") set(CMAKE_CXX_DEPFILE_FORMAT gcc) if(CMAKE_GENERATOR MATCHES "^Ninja") -- cgit v0.12 From a8b6bf9a38021a4de3a439acb94518d8fab5d345 Mon Sep 17 00:00:00 2001 From: "William R. Dieter" Date: Tue, 8 Feb 2022 22:10:02 -0800 Subject: IntelLLVM: Add dependencies on system header files on Windows In commit a90d2a9eed (IntelLLVM: Add support for Intel LLVM-based compilers, 2020-11-02, v3.20.0-rc1~89^2~20) the IntelLLVM depfile generation flags were taken from `Platform/Windows-Intel-C`. Those flags were added by commit a624a3e1b3 (Ninja: Use deps=gcc for Intel Compiler on Windows, 2019-01-30, v3.14.0-rc1~30^2), which forgot to account for commit 6d74e7870b (Ninja: Add dependencies on system-provided header files, 2016-03-15, v3.6.0-rc1~265^2). The `-QMD` option generates Makefile dependencies. The `-QMMD` option generates Makefile dependencies, but excludes system header files. Part of the BuildDepends test includes a header, cmake_pch.hxx, that includes a second header, zot_pch.hxx. The test builds a pch file for cmake_pch.hxx, touches zot_pch.hxx, then verifes that cmake_pch.hxx.pch is regenerated based on the dependencies. The cmake_pch.hxx contains `#pragma system_header` before it includes zot_pch.hxx. `#pragma system_header` indicates that the portion of the file following the pragma is to be treated as a system header. When `-QMMD` is used to generate dependencies, the `#include` of zot_pch.hxx is ignored because it `-QMMD` says to ignore system headers. Using `-QMD` instead uses all headers when generating dependencies and causes this test to pass. The Clang configuration in Platform/Windows-Clang.cmake also uses the `-MD` option for generating pre-compiled headers, instead of `-MMD`. Signed-off-by: William R. Dieter --- Modules/Platform/Windows-IntelLLVM.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Platform/Windows-IntelLLVM.cmake b/Modules/Platform/Windows-IntelLLVM.cmake index b9ea037..8231e78 100644 --- a/Modules/Platform/Windows-IntelLLVM.cmake +++ b/Modules/Platform/Windows-IntelLLVM.cmake @@ -12,6 +12,6 @@ include(Platform/Windows-MSVC) macro(__windows_compiler_intel lang) __windows_compiler_msvc(${lang}) - set(CMAKE_DEPFILE_FLAGS_${lang} "-QMMD -QMT -QMF ") + set(CMAKE_DEPFILE_FLAGS_${lang} "-QMD -QMT -QMF ") set(CMAKE_${lang}_DEPFILE_FORMAT gcc) endmacro() -- cgit v0.12