summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-09-24 22:13:20 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-10 09:04:39 (GMT)
commitbbef3c2da83b7a69d1f99b21dc92d5506d98fb35 (patch)
tree0648ee647358365e2fa3e3957aaa7271f831126c /Source/cmGlobalXCodeGenerator.cxx
parent12cb3bdce4b40c39b8697bbf89ea8aace6aeae8b (diff)
downloadCMake-bbef3c2da83b7a69d1f99b21dc92d5506d98fb35.zip
CMake-bbef3c2da83b7a69d1f99b21dc92d5506d98fb35.tar.gz
CMake-bbef3c2da83b7a69d1f99b21dc92d5506d98fb35.tar.bz2
cmLocalGenerator: Add current binary directory accessor.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 146fa39..b2d8f4a 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -414,11 +414,12 @@ void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root)
this->SetCurrentLocalGenerator(root);
cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentSourceDirectory(),
this->ProjectSourceDirectoryComponents);
- cmSystemTools::SplitPath(this->CurrentMakefile->GetCurrentBinaryDirectory(),
- this->ProjectOutputDirectoryComponents);
+ cmSystemTools::SplitPath(
+ this->CurrentLocalGenerator->GetCurrentBinaryDirectory(),
+ this->ProjectOutputDirectoryComponents);
this->CurrentXCodeHackMakefile =
- root->GetMakefile()->GetCurrentBinaryDirectory();
+ root->GetCurrentBinaryDirectory();
this->CurrentXCodeHackMakefile += "/CMakeScripts";
cmSystemTools::MakeDirectory(this->CurrentXCodeHackMakefile.c_str());
this->CurrentXCodeHackMakefile += "/XCODE_DEPEND_HELPER.make";
@@ -466,7 +467,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
allBuildGt->AddSource(listfile.c_str());
// Add XCODE depend helper
- std::string dir = mf->GetCurrentBinaryDirectory();
+ std::string dir = root->GetCurrentBinaryDirectory();
cmCustomCommandLine makeHelper;
if(this->XcodeVersion < 50)
{
@@ -568,7 +569,6 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
cmLocalGenerator* root, std::vector<cmLocalGenerator*> const& gens)
{
- cmMakefile* mf = root->GetMakefile();
std::vector<std::string> lfiles;
for(std::vector<cmLocalGenerator*>::const_iterator gi = gens.begin();
gi != gens.end(); ++gi)
@@ -582,7 +582,7 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
std::vector<std::string>::iterator new_end =
std::unique(lfiles.begin(), lfiles.end());
lfiles.erase(new_end, lfiles.end());
- this->CurrentReRunCMakeMakefile = mf->GetCurrentBinaryDirectory();
+ this->CurrentReRunCMakeMakefile = root->GetCurrentBinaryDirectory();
this->CurrentReRunCMakeMakefile += "/CMakeScripts";
cmSystemTools::MakeDirectory(this->CurrentReRunCMakeMakefile.c_str());
this->CurrentReRunCMakeMakefile += "/ReRunCMake.make";
@@ -1033,7 +1033,7 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen)
this->CurrentLocalGenerator = gen;
this->CurrentMakefile = gen->GetMakefile();
std::string outdir =
- cmSystemTools::CollapseFullPath(this->CurrentMakefile->
+ cmSystemTools::CollapseFullPath(this->CurrentLocalGenerator->
GetCurrentBinaryDirectory());
cmSystemTools::SplitPath(outdir.c_str(),
this->CurrentOutputDirectoryComponents);
@@ -1389,7 +1389,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget)
// linker language. This should convince Xcode to choose the proper
// language.
cmMakefile* mf = cmtarget.GetMakefile();
- std::string fname = mf->GetCurrentBinaryDirectory();
+ std::string fname = gtgt->GetLocalGenerator()->GetCurrentBinaryDirectory();
fname += cmake::GetCMakeFilesDirectory();
fname += "/";
fname += cmtarget.GetName();
@@ -1618,7 +1618,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
const & commands,
const char* name)
{
- std::string dir = this->CurrentMakefile->GetCurrentBinaryDirectory();
+ std::string dir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory();
dir += "/CMakeScripts";
cmSystemTools::MakeDirectory(dir.c_str());
std::string makefile = dir;
@@ -1639,7 +1639,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
currentConfig->c_str());
}
- std::string cdir = this->CurrentMakefile->GetCurrentBinaryDirectory();
+ std::string cdir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory();
cdir = this->ConvertToRelativeForXCode(cdir.c_str());
std::string makecmd = "make -C ";
makecmd += cdir;
@@ -1967,7 +1967,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
// Set attributes to specify the proper name for the target.
- std::string pndir = this->CurrentMakefile->GetCurrentBinaryDirectory();
+ std::string pndir = this->CurrentLocalGenerator->GetCurrentBinaryDirectory();
if(target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_LIBRARY ||
@@ -3484,7 +3484,7 @@ bool cmGlobalXCodeGenerator
}
}
- std::string symroot = root->GetMakefile()->GetCurrentBinaryDirectory();
+ std::string symroot = root->GetCurrentBinaryDirectory();
symroot += "/build";
buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot.c_str()));
@@ -3727,7 +3727,7 @@ cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root,
{
return;
}
- std::string xcodeDir = root->GetMakefile()->GetCurrentBinaryDirectory();
+ std::string xcodeDir = root->GetCurrentBinaryDirectory();
xcodeDir += "/";
xcodeDir += root->GetProjectName();
xcodeDir += ".xcode";