summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-12 18:56:37 (GMT)
committerBrad King <brad.king@kitware.com>2017-04-12 19:30:35 (GMT)
commit1afacebee9c42a0dccaf554db9cb048204913d38 (patch)
tree87af0a1d972ddd61cf64cd2a37d0c3e086b8d543 /Source/cmGlobalXCodeGenerator.cxx
parentfddd559406558a2037733e5b760e9dd04e9edfd1 (diff)
downloadCMake-1afacebee9c42a0dccaf554db9cb048204913d38.zip
CMake-1afacebee9c42a0dccaf554db9cb048204913d38.tar.gz
CMake-1afacebee9c42a0dccaf554db9cb048204913d38.tar.bz2
Xcode: Do not add Object Libraries source group on Xcode >= 5
The group is always empty because on Xcode 5 and above we list object library files directly on the link line and do not list sources for them.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index d07cc3d..b7ff7f3 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2799,17 +2799,20 @@ bool cmGlobalXCodeGenerator::CreateGroups(
this->GroupMap[key] = pbxgroup;
}
- // 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();
- oi != objs.end(); ++oi) {
- std::string const& source = *oi;
- cmSourceGroup* sourceGroup =
- mf->FindSourceGroup(source.c_str(), sourceGroups);
- cmXCodeObject* pbxgroup = this->CreateOrGetPBXGroup(gtgt, sourceGroup);
- std::string key = GetGroupMapKeyFromPath(gtgt, source);
- this->GroupMap[key] = pbxgroup;
+ 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();
+ oi != objs.end(); ++oi) {
+ std::string const& source = *oi;
+ cmSourceGroup* sourceGroup =
+ mf->FindSourceGroup(source.c_str(), sourceGroups);
+ cmXCodeObject* pbxgroup =
+ this->CreateOrGetPBXGroup(gtgt, sourceGroup);
+ std::string key = GetGroupMapKeyFromPath(gtgt, source);
+ this->GroupMap[key] = pbxgroup;
+ }
}
}
}