diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-21 18:38:10 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-24 07:19:54 (GMT) |
commit | ed4ea59a33d094245ff4807c143134846b2be77a (patch) | |
tree | cee4ff945778ccba550bb16361c8543fbf317e31 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 634155d6952033f353de90073ac58ef53a900306 (diff) | |
download | CMake-ed4ea59a33d094245ff4807c143134846b2be77a.zip CMake-ed4ea59a33d094245ff4807c143134846b2be77a.tar.gz CMake-ed4ea59a33d094245ff4807c143134846b2be77a.tar.bz2 |
Xcode: Port ForceLinkerLanguage to cmGeneratorTarget.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 16 |
1 files changed, 8 insertions, 8 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); |