cmMakefile: Rename SetStart* directory API to SetCurrent*.

This commit is contained in:
Stephen Kelly 2015-04-16 21:57:52 +02:00
parent 932d53bc02
commit b288a997e9
5 changed files with 10 additions and 10 deletions

View File

@ -348,8 +348,8 @@ void cmCTestScriptHandler::CreateCMake()
// Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR. // Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR.
// Also, some commands need Makefile->GetCurrentSourceDirectory(). // Also, some commands need Makefile->GetCurrentSourceDirectory().
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
this->Makefile->SetStartDirectory(cwd); this->Makefile->SetCurrentSourceDirectory(cwd);
this->Makefile->SetStartOutputDirectory(cwd); this->Makefile->SetCurrentBinaryDirectory(cwd);
// remove all cmake commands which are not scriptable, since they can't be // remove all cmake commands which are not scriptable, since they can't be
// used in ctest scripts // used in ctest scripts

View File

@ -1653,8 +1653,8 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
this->LocalGenerator->GetGlobalGenerator()->AddLocalGenerator(lg2); this->LocalGenerator->GetGlobalGenerator()->AddLocalGenerator(lg2);
// set the subdirs start dirs // set the subdirs start dirs
lg2->GetMakefile()->SetStartDirectory(srcPath); lg2->GetMakefile()->SetCurrentSourceDirectory(srcPath);
lg2->GetMakefile()->SetStartOutputDirectory(binPath); lg2->GetMakefile()->SetCurrentBinaryDirectory(binPath);
if(excludeFromAll) if(excludeFromAll)
{ {
lg2->GetMakefile()->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); lg2->GetMakefile()->SetProperty("EXCLUDE_FROM_ALL", "TRUE");

View File

@ -455,7 +455,7 @@ public:
* recursing up the tree starting at the StartDirectory and going up until * recursing up the tree starting at the StartDirectory and going up until
* it reaches the HomeDirectory. * it reaches the HomeDirectory.
*/ */
void SetStartDirectory(const std::string& dir) void SetCurrentSourceDirectory(const std::string& dir)
{ {
this->cmStartDirectory = dir; this->cmStartDirectory = dir;
cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory); cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory);
@ -464,7 +464,7 @@ public:
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
this->cmStartDirectory.c_str()); this->cmStartDirectory.c_str());
} }
void SetStartOutputDirectory(const std::string& dir) void SetCurrentBinaryDirectory(const std::string& dir)
{ {
this->StartOutputDirectory = dir; this->StartOutputDirectory = dir;
cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory); cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory);

View File

@ -375,11 +375,11 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator()); cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
lg->GetMakefile()->SetHomeOutputDirectory lg->GetMakefile()->SetHomeOutputDirectory
(cmSystemTools::GetCurrentWorkingDirectory()); (cmSystemTools::GetCurrentWorkingDirectory());
lg->GetMakefile()->SetStartOutputDirectory lg->GetMakefile()->SetCurrentBinaryDirectory
(cmSystemTools::GetCurrentWorkingDirectory()); (cmSystemTools::GetCurrentWorkingDirectory());
lg->GetMakefile()->SetHomeDirectory lg->GetMakefile()->SetHomeDirectory
(cmSystemTools::GetCurrentWorkingDirectory()); (cmSystemTools::GetCurrentWorkingDirectory());
lg->GetMakefile()->SetStartDirectory lg->GetMakefile()->SetCurrentSourceDirectory
(cmSystemTools::GetCurrentWorkingDirectory()); (cmSystemTools::GetCurrentWorkingDirectory());
if (this->GetWorkingMode() != NORMAL_MODE) if (this->GetWorkingMode() != NORMAL_MODE)
{ {

View File

@ -647,8 +647,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
{ {
cm.SetGlobalGenerator(ggd); cm.SetGlobalGenerator(ggd);
cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator()); cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator());
lgd->GetMakefile()->SetStartDirectory(startDir); lgd->GetMakefile()->SetCurrentSourceDirectory(startDir);
lgd->GetMakefile()->SetStartOutputDirectory(startOutDir); lgd->GetMakefile()->SetCurrentBinaryDirectory(startOutDir);
// Actually scan dependencies. // Actually scan dependencies.
return lgd->UpdateDependencies(depInfo.c_str(), return lgd->UpdateDependencies(depInfo.c_str(),