diff options
author | Brad King <brad.king@kitware.com> | 2023-12-05 14:25:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-12-05 14:25:51 (GMT) |
commit | e05cd2871df27e10fb14c7b3cf65dceb9752f843 (patch) | |
tree | 807f550f9f873740abad139a16c3feb1d24ecc01 /Source/cmLocalGenerator.cxx | |
parent | b709c42312f033a7b9fbe39ab2fa765ad5a219f6 (diff) | |
parent | 40dc13b24292354d07b9720d636fa48ab3eee219 (diff) | |
download | CMake-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.cxx | 3 |
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) { |