mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 05:16:58 +00:00
VS: Only generate RC options if necessary
The RC options were computed and generated for every vcxproj file before, even if no rc source was actually invocing the compiler. Now we check first if we actually need to compute these.
This commit is contained in:
1 parent
29d594d95a
commit
1ec0ddf399
1 file changed
+8
-4
@@ -4001,9 +4001,12 @@ void cmVisualStudio10TargetGenerator::WriteClOptions(
|
||||
|
||||
bool cmVisualStudio10TargetGenerator::ComputeRcOptions()
|
||||
{
|
||||
return std::all_of(
|
||||
this->Configurations.begin(), this->Configurations.end(),
|
||||
[this](std::string const& c) { return this->ComputeRcOptions(c); });
|
||||
return std::all_of(this->Configurations.begin(), this->Configurations.end(),
|
||||
[this](std::string const& c) {
|
||||
return !this->GeneratorTarget->IsLanguageUsed("RC",
|
||||
c) ||
|
||||
this->ComputeRcOptions(c);
|
||||
});
|
||||
}
|
||||
|
||||
bool cmVisualStudio10TargetGenerator::ComputeRcOptions(
|
||||
@@ -4036,7 +4039,8 @@ bool cmVisualStudio10TargetGenerator::ComputeRcOptions(
|
||||
void cmVisualStudio10TargetGenerator::WriteRCOptions(
|
||||
Elem& e1, std::string const& configName)
|
||||
{
|
||||
if (!this->MSTools) {
|
||||
if (!this->MSTools ||
|
||||
!this->GeneratorTarget->IsLanguageUsed("RC", configName)) {
|
||||
return;
|
||||
}
|
||||
Elem e2(e1, "ResourceCompile");
|
||||
|
||||
Reference in new issue
Block a user