summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-12-05 14:25:37 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-12-05 14:25:51 (GMT)
commite05cd2871df27e10fb14c7b3cf65dceb9752f843 (patch)
tree807f550f9f873740abad139a16c3feb1d24ecc01 /Source/cmLocalGenerator.cxx
parentb709c42312f033a7b9fbe39ab2fa765ad5a219f6 (diff)
parent40dc13b24292354d07b9720d636fa48ab3eee219 (diff)
downloadCMake-e05cd2871df27e10fb14c7b3cf65dceb9752f843.zip
CMake-e05cd2871df27e10fb14c7b3cf65dceb9752f843.tar.gz
CMake-e05cd2871df27e10fb14c7b3cf65dceb9752f843.tar.bz2
Merge topic 'cxxmodules-pch'
40dc13b242 cmNinjaTargetGenerator: PCH files do not need dyndep f61c64cd1c cmLocalGenerator: prevent scanning of PCH source files ea8c37b759 Tests/CXXModules: add a test which scans a PCH-using source Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9032
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 eaf38d4..2d5ae81 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2739,6 +2739,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) {