diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-12-04 13:43:25 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-12-04 13:43:45 (GMT) |
commit | f61c64cd1cac7c9a6ec93d63647f332a5915da13 (patch) | |
tree | bf64d64f99510e87376e3daa11a1f8d9a4229dd5 /Source/cmLocalGenerator.cxx | |
parent | ea8c37b759cfcf78ddeab9b296e874ee8a5212e1 (diff) | |
download | CMake-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.cxx | 3 |
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) { |