From 1ab4d186a7d5a3481d2f0978aaebd6bf0bc7f891 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 11 Jan 2018 10:55:20 -0500 Subject: cmLocalVisualStudio7Generator: Clarify variable name of compiled language --- Source/cmLocalVisualStudio7Generator.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 7aae250..4cc6e3c 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -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); -- cgit v0.12