summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-28 19:23:21 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-11-28 19:23:21 (GMT)
commit8a975efc94518c93124d66a7a6626d8ab13f9561 (patch)
tree46bcc56b4cd5a3dfb994da3a690aaeb9cc6aa0b3 /Source/cmGlobalXCodeGenerator.cxx
parent1b22cb0a07be25bf6b8bf3afc8ffae7c928a90c9 (diff)
parent543dcb0ada5047d789a19dbbffa9028cb1b317c7 (diff)
downloadCMake-8a975efc94518c93124d66a7a6626d8ab13f9561.zip
CMake-8a975efc94518c93124d66a7a6626d8ab13f9561.tar.gz
CMake-8a975efc94518c93124d66a7a6626d8ab13f9561.tar.bz2
Merge topic '16449-revert-xcode-system-includes'
543dcb0a Revert "Xcode: Obey SYSTEM keyword for includes (#15687)"
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx44
1 files changed, 14 insertions, 30 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 84a8c5e..4a75b4d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1925,40 +1925,24 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
BuildObjectListOrString dirs(this, this->XcodeVersion >= 30);
BuildObjectListOrString fdirs(this, this->XcodeVersion >= 30);
+ std::vector<std::string> includes;
+ this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt, "C",
+ configName);
std::set<std::string> emitted;
emitted.insert("/System/Library/Frameworks");
- if (this->XcodeVersion < 60) {
- std::vector<std::string> includes;
- this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt, "C",
- configName);
- for (std::vector<std::string>::iterator i = includes.begin();
- i != includes.end(); ++i) {
- if (this->NameResolvesToFramework(*i)) {
- std::string frameworkDir = *i;
- frameworkDir += "/../";
- frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir);
- if (emitted.insert(frameworkDir).second) {
- fdirs.Add(this->XCodeEscapePath(frameworkDir));
- }
- } else {
- std::string incpath = this->XCodeEscapePath(*i);
- dirs.Add(incpath);
- }
- }
- } else {
- for (std::set<std::string>::iterator li = languages.begin();
- li != languages.end(); ++li) {
- std::vector<std::string> includes;
- this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt, *li,
- configName);
- std::string includeFlags = this->CurrentLocalGenerator->GetIncludeFlags(
- includes, gtgt, *li, true, false, configName);
-
- std::string& flags = cflags[*li];
- if (!includeFlags.empty()) {
- flags += " " + includeFlags;
+ for (std::vector<std::string>::iterator i = includes.begin();
+ i != includes.end(); ++i) {
+ if (this->NameResolvesToFramework(*i)) {
+ std::string frameworkDir = *i;
+ frameworkDir += "/../";
+ frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir);
+ if (emitted.insert(frameworkDir).second) {
+ fdirs.Add(this->XCodeEscapePath(frameworkDir));
}
+ } else {
+ std::string incpath = this->XCodeEscapePath(*i);
+ dirs.Add(incpath);
}
}
// Add framework search paths needed for linking.