summaryrefslogtreecommitdiff
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-11-06 14:23:47 +0000
committerKitware Robot <kwrobot@kitware.com>2019-11-06 09:23:56 -0500
commit30908fa0ee965a67c6dbdc554c67038d14bca7d6 (patch)
tree2bd68710d01e40efa22fe81ad5a48b05886ba839 /Source/cmGlobalXCodeGenerator.cxx
parent48d3b83b9dd3a97874f560660a21b7af8e10ffff (diff)
parent0ce8a5c08de0852f22f9be595c6f08a4a6c865e9 (diff)
downloadcmake-30908fa0ee965a67c6dbdc554c67038d14bca7d6.tar.gz
Merge topic 'xcode-restore-CMakeLists'
0ce8a5c08d Xcode: Fix generated references to CMakeLists.txt files 9457c95aa0 cmGlobalXCodeGenerator: Mark known source locations Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3999
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx24
1 files changed, 14 insertions, 10 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 8a731cf37d..998ffa6918 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -779,7 +779,7 @@ public:
"Xcode does not support per-config per-source " << property << ":\n"
" " << expression << "\n"
"specified for source:\n"
- " " << this->SourceFile->GetFullPath() << "\n";
+ " " << this->SourceFile->ResolveFullPath() << "\n";
/* clang-format on */
this->LocalGenerator->IssueMessage(MessageType::FATAL_ERROR, e.str());
}
@@ -853,7 +853,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile(
lg->AppendFlags(flags, lg->GetIncludeFlags(includes, gtgt, lang, true));
cmXCodeObject* buildFile =
- this->CreateXCodeSourceFileFromPath(sf->GetFullPath(), gtgt, lang, sf);
+ this->CreateXCodeSourceFileFromPath(sf->ResolveFullPath(), gtgt, lang, sf);
cmXCodeObject* settings = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
settings->AddAttributeIfNotEmpty("COMPILER_FLAGS",
@@ -899,7 +899,8 @@ void cmGlobalXCodeGenerator::AddXCodeProjBuildRule(
std::string listfile =
cmStrCat(target->GetLocalGenerator()->GetCurrentSourceDirectory(),
"/CMakeLists.txt");
- cmSourceFile* srcCMakeLists = target->Makefile->GetOrCreateSource(listfile);
+ cmSourceFile* srcCMakeLists = target->Makefile->GetOrCreateSource(
+ listfile, false, cmSourceFileLocationKind::Known);
if (!cmContains(sources, srcCMakeLists)) {
sources.push_back(srcCMakeLists);
}
@@ -1032,7 +1033,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeFileReference(
{
std::string lang = this->CurrentLocalGenerator->GetSourceFileLanguage(*sf);
- return this->CreateXCodeFileReferenceFromPath(sf->GetFullPath(), target,
+ return this->CreateXCodeFileReferenceFromPath(sf->ResolveFullPath(), target,
lang, sf);
}
@@ -1067,7 +1068,7 @@ struct cmSourceFilePathCompare
{
bool operator()(cmSourceFile* l, cmSourceFile* r)
{
- return l->GetFullPath() < r->GetFullPath();
+ return l->ResolveFullPath() < r->ResolveFullPath();
}
};
@@ -1142,7 +1143,8 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget(
// Add the Info.plist we are about to generate for an App Bundle.
if (gtgt->GetPropertyAsBool("MACOSX_BUNDLE")) {
std::string plist = this->ComputeInfoPListLocation(gtgt);
- cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(plist, true);
+ cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(
+ plist, true, cmSourceFileLocationKind::Known);
classes.push_back(sf);
}
@@ -2858,15 +2860,17 @@ bool cmGlobalXCodeGenerator::CreateGroups(
std::string listfile =
cmStrCat(gtgt->GetLocalGenerator()->GetCurrentSourceDirectory(),
"/CMakeLists.txt");
- cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(listfile);
- addSourceToGroup(sf->GetFullPath());
+ cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(
+ listfile, false, cmSourceFileLocationKind::Known);
+ addSourceToGroup(sf->ResolveFullPath());
}
// Add the Info.plist we are about to generate for an App Bundle.
if (gtgt->GetPropertyAsBool("MACOSX_BUNDLE")) {
std::string plist = this->ComputeInfoPListLocation(gtgt);
- cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(plist, true);
- addSourceToGroup(sf->GetFullPath());
+ cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(
+ plist, true, cmSourceFileLocationKind::Known);
+ addSourceToGroup(sf->ResolveFullPath());
}
}
}