mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 14:19:59 -05:00
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
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user