summaryrefslogtreecommitdiff
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-04 19:19:49 +0200
committerStephen Kelly <steveire@gmail.com>2015-08-05 18:20:48 +0200
commit7c809fa2a675b7e669e76683f73397e38dd22999 (patch)
tree41f75f44f46067e53e5bf76544d476ae8db41c99 /Source/cmLocalVisualStudio7Generator.cxx
parent6da99de3236fbaeebf6a4fc66f7d68f43a59902f (diff)
downloadcmake-7c809fa2a675b7e669e76683f73397e38dd22999.tar.gz
cmGeneratorTarget: Move GetLinkerLanguage from cmTarget.
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 9f26712e5d..a38a06132a 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -664,6 +664,10 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
const char* configType = "10";
const char* projectType = 0;
bool targetBuilds = true;
+
+ cmGeneratorTarget* gt =
+ this->GlobalGenerator->GetGeneratorTarget(&target);
+
switch(target.GetType())
{
case cmTarget::OBJECT_LIBRARY:
@@ -696,7 +700,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
{
const std::string& linkLanguage = (this->FortranProject?
std::string("Fortran"):
- target.GetLinkerLanguage(configName));
+ gt->GetLinkerLanguage(configName));
if(linkLanguage.empty())
{
cmSystemTools::Error
@@ -758,8 +762,6 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
targetOptions.Parse(flags.c_str());
targetOptions.Parse(defineFlags.c_str());
targetOptions.ParseFinish();
- cmGeneratorTarget* gt =
- this->GlobalGenerator->GetGeneratorTarget(&target);
std::vector<std::string> targetDefines;
target.GetCompileDefinitions(targetDefines, configName, "CXX");
targetOptions.AddDefines(targetDefines);
@@ -1635,7 +1637,7 @@ cmLocalVisualStudio7GeneratorFCInfo
lg->GlobalGenerator->GetLanguageFromExtension
(sf.GetExtension().c_str());
const std::string& sourceLang = lg->GetSourceFileLanguage(sf);
- const std::string& linkLanguage = target.GetLinkerLanguage(i->c_str());
+ const std::string& linkLanguage = gt->GetLinkerLanguage(i->c_str());
bool needForceLang = false;
// source file does not match its extension language
if(lang != sourceLang)