summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx16
-rw-r--r--Source/cmGlobalXCodeGenerator.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 6e2e386..f00c9e5 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1368,22 +1368,22 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguages()
for(TargetMap::const_iterator
ti = this->TotalTargets.begin(); ti != this->TotalTargets.end(); ++ti)
{
- this->ForceLinkerLanguage(*ti->second);
+ cmGeneratorTarget* gt = this->GetGeneratorTarget(ti->second);
+ this->ForceLinkerLanguage(gt);
}
}
//----------------------------------------------------------------------------
-void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget)
+void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmGeneratorTarget* gtgt)
{
// This matters only for targets that link.
- if(cmtarget.GetType() != cmState::EXECUTABLE &&
- cmtarget.GetType() != cmState::SHARED_LIBRARY &&
- cmtarget.GetType() != cmState::MODULE_LIBRARY)
+ if(gtgt->GetType() != cmState::EXECUTABLE &&
+ gtgt->GetType() != cmState::SHARED_LIBRARY &&
+ gtgt->GetType() != cmState::MODULE_LIBRARY)
{
return;
}
- cmGeneratorTarget *gtgt = this->GetGeneratorTarget(&cmtarget);
std::string llang = gtgt->GetLinkerLanguage("NOCONFIG");
if(llang.empty()) { return; }
@@ -1399,11 +1399,11 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget)
// Add an empty source file to the target that compiles with the
// linker language. This should convince Xcode to choose the proper
// language.
- cmMakefile* mf = cmtarget.GetMakefile();
+ cmMakefile* mf = gtgt->Target->GetMakefile();
std::string fname = gtgt->GetLocalGenerator()->GetCurrentBinaryDirectory();
fname += cmake::GetCMakeFilesDirectory();
fname += "/";
- fname += cmtarget.GetName();
+ fname += gtgt->GetName();
fname += "-CMakeForceLinker";
fname += ".";
fname += cmSystemTools::LowerCase(llang);
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index feb5009..10d9bd6 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -135,7 +135,7 @@ private:
cmXCodeObject* CreateXCodeTarget(cmTarget& target,
cmXCodeObject* buildPhases);
void ForceLinkerLanguages();
- void ForceLinkerLanguage(cmTarget& cmtarget);
+ void ForceLinkerLanguage(cmGeneratorTarget* gtgt);
const char* GetTargetLinkFlagsVar(cmTarget const& cmtarget) const;
const char* GetTargetFileType(cmGeneratorTarget* target);
const char* GetTargetProductType(cmGeneratorTarget* target);