summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-12-26 16:43:03 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2024-01-06 16:18:57 (GMT)
commit029ddc341055b6eeee0c90ed843cf4b56e10a0e9 (patch)
tree7a51511b40fbbe08f53173c2a436de70d99219b2 /Source
parent6c9614cbf4538924367ffd422f69e7ad086543d2 (diff)
downloadCMake-029ddc341055b6eeee0c90ed843cf4b56e10a0e9.zip
CMake-029ddc341055b6eeee0c90ed843cf4b56e10a0e9.tar.gz
CMake-029ddc341055b6eeee0c90ed843cf4b56e10a0e9.tar.bz2
cmVisualStudio10TargetGenerator: always specify scanning
Set that sources should not be scanned on a target-wide basis and then enable on a per-TU basis as needed. Fixes: #25519
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index e0be04d..708cbaf 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2827,7 +2827,7 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
// use them
if (!flags.empty() || !options.empty() || !configDefines.empty() ||
!includes.empty() || compileAsPerConfig || noWinRT ||
- !options.empty() || needsPCHFlags) {
+ !options.empty() || needsPCHFlags || shouldScanForModules) {
cmGlobalVisualStudio10Generator* gg = this->GlobalGenerator;
cmIDEFlagTable const* flagtable = nullptr;
const std::string& srclang = source->GetLanguage();
@@ -2857,8 +2857,6 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
}
if (shouldScanForModules) {
clOptions.AddFlag("ScanSourceForModuleDependencies", "true");
- } else {
- clOptions.AddFlag("ScanSourceForModuleDependencies", "false");
}
if (noWinRT) {
clOptions.AddFlag("CompileAsWinRT", "false");
@@ -3564,6 +3562,9 @@ void cmVisualStudio10TargetGenerator::WriteClOptions(
e2.Element("AdditionalUsingDirectories", dirs);
}
}
+
+ // Disable C++ source scanning by default.
+ e2.Element("ScanSourceForModuleDependencies", "false");
}
bool cmVisualStudio10TargetGenerator::ComputeRcOptions()