summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-12-04 13:43:25 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-12-04 13:43:45 (GMT)
commitf61c64cd1cac7c9a6ec93d63647f332a5915da13 (patch)
treebf64d64f99510e87376e3daa11a1f8d9a4229dd5 /Source/cmLocalGenerator.cxx
parentea8c37b759cfcf78ddeab9b296e874ee8a5212e1 (diff)
downloadCMake-f61c64cd1cac7c9a6ec93d63647f332a5915da13.zip
CMake-f61c64cd1cac7c9a6ec93d63647f332a5915da13.tar.gz
CMake-f61c64cd1cac7c9a6ec93d63647f332a5915da13.tar.bz2
cmLocalGenerator: prevent scanning of PCH source files
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index fe8d502..caac535 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2706,6 +2706,9 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
auto* pch_sf = this->Makefile->GetOrCreateSource(
pchSource, false, cmSourceFileLocationKind::Known);
+ // PCH sources should never be scanned as they cannot contain C++
+ // module references.
+ pch_sf->SetProperty("CXX_SCAN_FOR_MODULES", "0");
if (!this->GetGlobalGenerator()->IsXcode()) {
if (!ReuseFrom) {