summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-12 15:11:57 -0400
committerBrad King <brad.king@kitware.com>2017-04-12 15:38:35 -0400
commit63fbf587509c63395c024026b7bf264dbae446a1 (patch)
tree8320e535611da31529c7095e3b840507e0b9543e
parent1afacebee9c42a0dccaf554db9cb048204913d38 (diff)
downloadcmake-63fbf587509c63395c024026b7bf264dbae446a1.tar.gz
Xcode: Inline relevant parts of UseObjectLibraries
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx34
1 files changed, 22 insertions, 12 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index b7ff7f3014..9d1f771f0d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1051,11 +1051,14 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets(
// Add object library contents as external objects. (Equivalent to
// the externalObjFiles above, except each one is not a cmSourceFile
// within the target.)
- std::vector<std::string> objs;
- gtgt->UseObjectLibraries(objs, "");
- for (std::vector<std::string>::const_iterator oi = objs.begin();
+ std::vector<cmSourceFile const*> objs;
+ gtgt->GetExternalObjects(objs, "");
+ for (std::vector<cmSourceFile const*>::const_iterator oi = objs.begin();
oi != objs.end(); ++oi) {
- std::string obj = *oi;
+ if ((*oi)->GetObjectLibrary().empty()) {
+ continue;
+ }
+ std::string const& obj = (*oi)->GetFullPath();
cmXCodeObject* xsf =
this->CreateXCodeSourceFileFromPath(obj, gtgt, "", 0);
externalObjFiles.push_back(xsf);
@@ -2669,13 +2672,16 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
// Add object library contents as link flags.
std::string linkObjs;
const char* sep = "";
- std::vector<std::string> objs;
- gt->UseObjectLibraries(objs, "");
- for (std::vector<std::string>::const_iterator oi = objs.begin();
+ std::vector<cmSourceFile const*> objs;
+ gt->GetExternalObjects(objs, "");
+ for (std::vector<cmSourceFile const*>::const_iterator oi = objs.begin();
oi != objs.end(); ++oi) {
+ if ((*oi)->GetObjectLibrary().empty()) {
+ continue;
+ }
linkObjs += sep;
sep = " ";
- linkObjs += this->XCodeEscapePath(*oi);
+ linkObjs += this->XCodeEscapePath((*oi)->GetFullPath());
}
this->AppendBuildSettingAttribute(
target, this->GetTargetLinkFlagsVar(gt), linkObjs.c_str(), configName);
@@ -2801,11 +2807,15 @@ bool cmGlobalXCodeGenerator::CreateGroups(
if (this->XcodeVersion < 50) {
// Put OBJECT_LIBRARY objects in proper groups:
- std::vector<std::string> objs;
- gtgt->UseObjectLibraries(objs, "");
- for (std::vector<std::string>::const_iterator oi = objs.begin();
+ std::vector<cmSourceFile const*> objs;
+ gtgt->GetExternalObjects(objs, "");
+ for (std::vector<cmSourceFile const*>::const_iterator oi =
+ objs.begin();
oi != objs.end(); ++oi) {
- std::string const& source = *oi;
+ if ((*oi)->GetObjectLibrary().empty()) {
+ continue;
+ }
+ std::string const& source = (*oi)->GetFullPath();
cmSourceGroup* sourceGroup =
mf->FindSourceGroup(source.c_str(), sourceGroups);
cmXCodeObject* pbxgroup =