mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 05:16:58 +00:00
VS: Only generate MASM options if necessary
The MASM options were computed and generated for every vcxproj file before, even if no source file actually used the ASM_MASM compiler. Now we check first if we actually need to compute these.
This commit is contained in:
1 parent
c8046c55ba
commit
b07b27d57c
1 file changed
+8
-4
@@ -4429,9 +4429,12 @@ bool cmVisualStudio10TargetGenerator::ComputeMasmOptions()
|
||||
if (!this->GlobalGenerator->IsMasmEnabled()) {
|
||||
return true;
|
||||
}
|
||||
return std::all_of(
|
||||
this->Configurations.begin(), this->Configurations.end(),
|
||||
[this](std::string const& c) { return this->ComputeMasmOptions(c); });
|
||||
return std::all_of(this->Configurations.begin(), this->Configurations.end(),
|
||||
[this](std::string const& c) {
|
||||
return !this->GeneratorTarget->IsLanguageUsed(
|
||||
"ASM_MASM", c) ||
|
||||
this->ComputeMasmOptions(c);
|
||||
});
|
||||
}
|
||||
|
||||
bool cmVisualStudio10TargetGenerator::ComputeMasmOptions(
|
||||
@@ -4465,7 +4468,8 @@ bool cmVisualStudio10TargetGenerator::ComputeMasmOptions(
|
||||
void cmVisualStudio10TargetGenerator::WriteMasmOptions(
|
||||
Elem& e1, std::string const& configName)
|
||||
{
|
||||
if (!this->MSTools || !this->GlobalGenerator->IsMasmEnabled()) {
|
||||
if (!this->MSTools || !this->GlobalGenerator->IsMasmEnabled() ||
|
||||
!this->GeneratorTarget->IsLanguageUsed("ASM_MASM", configName)) {
|
||||
return;
|
||||
}
|
||||
Elem e2(e1, "MASM");
|
||||
|
||||
Reference in new issue
Block a user