[cmake-commits] king committed cmGlobalXCodeGenerator.cxx 1.149 1.150
cmGlobalXCodeGenerator.h 1.47 1.48
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri May 11 13:52:35 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv584
Modified Files:
cmGlobalXCodeGenerator.cxx cmGlobalXCodeGenerator.h
Log Message:
BUG: Fixed generation of XCODE_DEPEND_HELPER.make into proper directory. Cleaned up duplicate code created by recent changes.
Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- cmGlobalXCodeGenerator.cxx 10 May 2007 15:38:23 -0000 1.149
+++ cmGlobalXCodeGenerator.cxx 11 May 2007 17:52:33 -0000 1.150
@@ -229,14 +229,7 @@
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
{
cmLocalGenerator* root = it->second[0];
- this->CurrentProject = root->GetMakefile()->GetProjectName();
- this->SetCurrentLocalGenerator(root);
- this->OutputDir = this->CurrentMakefile->GetHomeOutputDirectory();
- this->OutputDir =
- cmSystemTools::CollapseFullPath(this->OutputDir.c_str());
- cmSystemTools::SplitPath(this->OutputDir.c_str(),
- this->ProjectOutputDirectoryComponents);
- this->CurrentLocalGenerator = root;
+ this->SetGenerationRoot(root);
// add ALL_BUILD, INSTALL, etc
this->AddExtraTargets(root, it->second);
}
@@ -244,20 +237,30 @@
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
{
cmLocalGenerator* root = it->second[0];
- this->CurrentProject = root->GetMakefile()->GetProjectName();
- this->SetCurrentLocalGenerator(root);
- this->OutputDir = this->CurrentMakefile->GetHomeOutputDirectory();
- this->OutputDir =
- cmSystemTools::CollapseFullPath(this->OutputDir.c_str());
- cmSystemTools::SplitPath(this->OutputDir.c_str(),
- this->ProjectOutputDirectoryComponents);
- this->CurrentLocalGenerator = root;
+ this->SetGenerationRoot(root);
// now create the project
this->OutputXCodeProject(root, it->second);
}
}
//----------------------------------------------------------------------------
+void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root)
+{
+ this->CurrentProject = root->GetMakefile()->GetProjectName();
+ this->SetCurrentLocalGenerator(root);
+ std::string outDir = this->CurrentMakefile->GetHomeOutputDirectory();
+ outDir =cmSystemTools::CollapseFullPath(outDir.c_str());
+ cmSystemTools::SplitPath(outDir.c_str(),
+ this->ProjectOutputDirectoryComponents);
+
+ this->CurrentXCodeHackMakefile =
+ root->GetMakefile()->GetCurrentOutputDirectory();
+ this->CurrentXCodeHackMakefile += "/CMakeScripts";
+ cmSystemTools::MakeDirectory(this->CurrentXCodeHackMakefile.c_str());
+ this->CurrentXCodeHackMakefile += "/XCODE_DEPEND_HELPER.make";
+}
+
+//----------------------------------------------------------------------------
void
cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& gens)
@@ -273,10 +276,6 @@
// Add XCODE depend helper
std::string dir = mf->GetCurrentOutputDirectory();
- this->CurrentXCodeHackMakefile = dir;
- this->CurrentXCodeHackMakefile += "/CMakeScripts";
- cmSystemTools::MakeDirectory(this->CurrentXCodeHackMakefile.c_str());
- this->CurrentXCodeHackMakefile += "/XCODE_DEPEND_HELPER.make";
cmCustomCommandLine makecommand;
makecommand.push_back("make");
makecommand.push_back("-C");
Index: cmGlobalXCodeGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- cmGlobalXCodeGenerator.h 10 May 2007 15:38:23 -0000 1.47
+++ cmGlobalXCodeGenerator.h 11 May 2007 17:52:33 -0000 1.48
@@ -157,6 +157,7 @@
cmXCodeObject* dependTarget);
void CreateXCodeDependHackTarget(std::vector<cmXCodeObject*>& targets);
bool SpecialTargetEmitted(std::string const& tname);
+ void SetGenerationRoot(cmLocalGenerator* root);
void AddExtraTargets(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& gens);
cmXCodeObject* CreateBuildPhase(const char* name,
@@ -186,7 +187,6 @@
std::string CurrentReRunCMakeMakefile;
std::string CurrentXCodeHackMakefile;
std::string CurrentProject;
- std::string OutputDir;
std::set<cmStdString> TargetDoneSet;
std::vector<std::string> CurrentOutputDirectoryComponents;
std::vector<std::string> ProjectOutputDirectoryComponents;
More information about the Cmake-commits
mailing list