|
@@ -2784,7 +2784,7 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
|
|
|
isCppModule = true;
|
|
isCppModule = true;
|
|
|
if (shouldScanForModules &&
|
|
if (shouldScanForModules &&
|
|
|
this->GlobalGenerator->IsScanDependenciesSupported()) {
|
|
this->GlobalGenerator->IsScanDependenciesSupported()) {
|
|
|
- // ScanSourceforModuleDependencies uses 'cl /scanDependencies' and
|
|
|
|
|
|
|
+ // ScanSourceForModuleDependencies uses 'cl /scanDependencies' and
|
|
|
// can distinguish module interface units and internal partitions.
|
|
// can distinguish module interface units and internal partitions.
|
|
|
compileAsPerConfig = "CompileAsCpp";
|
|
compileAsPerConfig = "CompileAsCpp";
|
|
|
} else {
|
|
} else {
|
|
@@ -2827,7 +2827,7 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
|
|
|
// use them
|
|
// use them
|
|
|
if (!flags.empty() || !options.empty() || !configDefines.empty() ||
|
|
if (!flags.empty() || !options.empty() || !configDefines.empty() ||
|
|
|
!includes.empty() || compileAsPerConfig || noWinRT ||
|
|
!includes.empty() || compileAsPerConfig || noWinRT ||
|
|
|
- !options.empty() || needsPCHFlags) {
|
|
|
|
|
|
|
+ !options.empty() || needsPCHFlags || shouldScanForModules) {
|
|
|
cmGlobalVisualStudio10Generator* gg = this->GlobalGenerator;
|
|
cmGlobalVisualStudio10Generator* gg = this->GlobalGenerator;
|
|
|
cmIDEFlagTable const* flagtable = nullptr;
|
|
cmIDEFlagTable const* flagtable = nullptr;
|
|
|
const std::string& srclang = source->GetLanguage();
|
|
const std::string& srclang = source->GetLanguage();
|
|
@@ -2856,9 +2856,7 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
|
|
|
clOptions.AddFlag("CompileAs", compileAsPerConfig);
|
|
clOptions.AddFlag("CompileAs", compileAsPerConfig);
|
|
|
}
|
|
}
|
|
|
if (shouldScanForModules) {
|
|
if (shouldScanForModules) {
|
|
|
- clOptions.AddFlag("ScanSourceforModuleDependencies", "true");
|
|
|
|
|
- } else {
|
|
|
|
|
- clOptions.AddFlag("ScanSourceforModuleDependencies", "false");
|
|
|
|
|
|
|
+ clOptions.AddFlag("ScanSourceForModuleDependencies", "true");
|
|
|
}
|
|
}
|
|
|
if (noWinRT) {
|
|
if (noWinRT) {
|
|
|
clOptions.AddFlag("CompileAsWinRT", "false");
|
|
clOptions.AddFlag("CompileAsWinRT", "false");
|
|
@@ -3574,6 +3572,9 @@ void cmVisualStudio10TargetGenerator::WriteClOptions(
|
|
|
e2.Element("AdditionalUsingDirectories", dirs);
|
|
e2.Element("AdditionalUsingDirectories", dirs);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // Disable C++ source scanning by default.
|
|
|
|
|
+ e2.Element("ScanSourceForModuleDependencies", "false");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool cmVisualStudio10TargetGenerator::ComputeRcOptions()
|
|
bool cmVisualStudio10TargetGenerator::ComputeRcOptions()
|