summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-11 15:55:20 (GMT)
committerBrad King <brad.king@kitware.com>2018-01-11 15:55:20 (GMT)
commit1ab4d186a7d5a3481d2f0978aaebd6bf0bc7f891 (patch)
treed9a977d61f71a45faa7780e4cfd73f9f71b9eaa7 /Source/cmLocalVisualStudio7Generator.cxx
parent07e1a74361b89c1080db1bca904dcd82e955777d (diff)
downloadCMake-1ab4d186a7d5a3481d2f0978aaebd6bf0bc7f891.zip
CMake-1ab4d186a7d5a3481d2f0978aaebd6bf0bc7f891.tar.gz
CMake-1ab4d186a7d5a3481d2f0978aaebd6bf0bc7f891.tar.bz2
cmLocalVisualStudio7Generator: Clarify variable name of compiled language
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx10
1 files 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);