summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx14
-rw-r--r--Source/cmGlobalXCodeGenerator.h3
2 files changed, 5 insertions, 12 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index f753f775e9..dd0ddf5e78 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -586,13 +586,7 @@ void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root)
{
this->CurrentProject = root->GetProjectName();
this->SetCurrentLocalGenerator(root);
- cmSystemTools::SplitPath(
- this->CurrentLocalGenerator->GetCurrentSourceDirectory(),
- this->ProjectSourceDirectoryComponents);
- cmSystemTools::SplitPath(
- this->CurrentLocalGenerator->GetCurrentBinaryDirectory(),
- this->ProjectOutputDirectoryComponents);
-
+ this->CurrentRootGenerator = root;
this->CurrentXCodeHackMakefile =
cmStrCat(root->GetCurrentBinaryDirectory(), "/CMakeScripts");
cmSystemTools::MakeDirectory(this->CurrentXCodeHackMakefile);
@@ -4704,13 +4698,13 @@ std::string cmGlobalXCodeGenerator::RelativeToSource(const std::string& p)
// We force conversion because Xcode breakpoints do not work unless
// they are in a file named relative to the source tree.
return cmSystemTools::ForceToRelativePath(
- cmSystemTools::JoinPath(this->ProjectSourceDirectoryComponents), p);
+ this->CurrentRootGenerator->GetCurrentSourceDirectory(), p);
}
std::string cmGlobalXCodeGenerator::RelativeToBinary(const std::string& p)
{
- return this->CurrentLocalGenerator->MaybeConvertToRelativePath(
- cmSystemTools::JoinPath(this->ProjectOutputDirectoryComponents), p);
+ return this->CurrentRootGenerator->MaybeConvertToRelativePath(
+ this->CurrentRootGenerator->GetCurrentBinaryDirectory(), p);
}
std::string cmGlobalXCodeGenerator::XCodeEscapePath(const std::string& p)
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index a7b1814c5f..1e1b344c9b 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -348,13 +348,12 @@ private:
cmXCodeObject* FrameworkGroup;
cmMakefile* CurrentMakefile;
cmLocalGenerator* CurrentLocalGenerator;
+ cmLocalGenerator* CurrentRootGenerator = nullptr;
std::vector<std::string> CurrentConfigurationTypes;
std::string CurrentReRunCMakeMakefile;
std::string CurrentXCodeHackMakefile;
std::string CurrentProject;
std::set<std::string> TargetDoneSet;
- std::vector<std::string> ProjectSourceDirectoryComponents;
- std::vector<std::string> ProjectOutputDirectoryComponents;
std::map<std::string, cmXCodeObject*> GroupMap;
std::map<std::string, cmXCodeObject*> GroupNameMap;
std::map<std::string, cmXCodeObject*> TargetGroup;