cmLocalVisualStudio7Generator: Clarify variable name of compiled language

This commit is contained in:
Brad King
2018-01-11 10:55:20 -05:00
parent 07e1a74361
commit 1ab4d186a7
+6 -4
View File
@@ -637,6 +637,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
configType = projectType;
}
std::string flags;
std::string langForClCompile;
if (target->GetType() <= cmStateEnums::OBJECT_LIBRARY) {
const std::string& linkLanguage =
(this->FortranProject ? std::string("Fortran")
@@ -647,10 +648,11 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
target->GetName().c_str());
return;
}
if (linkLanguage == "C" || linkLanguage == "CXX" ||
linkLanguage == "Fortran") {
langForClCompile = linkLanguage;
if (langForClCompile == "C" || langForClCompile == "CXX" ||
langForClCompile == "Fortran") {
std::string baseFlagVar = "CMAKE_";
baseFlagVar += linkLanguage;
baseFlagVar += langForClCompile;
baseFlagVar += "_FLAGS";
flags = this->Makefile->GetRequiredDefinition(baseFlagVar.c_str());
std::string flagVar =
@@ -667,7 +669,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
}
// Add the target-specific flags.
this->AddCompileOptions(flags, target, linkLanguage, configName);
this->AddCompileOptions(flags, target, langForClCompile, configName);
// Check IPO related warning/error.
target->IsIPOEnabled(linkLanguage, configName);