mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 05:16:58 +00:00
VS: Only generate MIDL options if necessary
The MIDL options were computed and generated for every vcxproj file before, even if no idl source was actually invocing the compiler. Now we check first if we actually need to compute these.
This commit is contained in:
1 parent
b07b27d57c
commit
29d594d95a
1 file changed
+10
@@ -5255,6 +5255,16 @@ void cmVisualStudio10TargetGenerator::WriteMidlOptions(
|
||||
return;
|
||||
}
|
||||
|
||||
cmGeneratorTarget::KindedSources const& sourceFiles =
|
||||
this->GeneratorTarget->GetKindedSources(configName);
|
||||
auto isIdlFile = [](cmGeneratorTarget::SourceAndKind const& sourceAndKind) {
|
||||
return sourceAndKind.Kind == cmGeneratorTarget::SourceKind::SourceKindIDL;
|
||||
};
|
||||
if (std::none_of(sourceFiles.Sources.begin(), sourceFiles.Sources.end(),
|
||||
isIdlFile)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// This processes *any* of the .idl files specified in the project's file
|
||||
// list (and passed as the item metadata %(Filename) expressing the rule
|
||||
// input filename) into output files at the per-config *build* dir
|
||||
|
||||
Reference in new issue
Block a user