diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 31c0171b9..7f64d570a 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -348,8 +348,8 @@ void cmCTestScriptHandler::CreateCMake() // Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR. // Also, some commands need Makefile->GetCurrentSourceDirectory(). std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); - this->Makefile->SetStartDirectory(cwd); - this->Makefile->SetStartOutputDirectory(cwd); + this->Makefile->SetCurrentSourceDirectory(cwd); + this->Makefile->SetCurrentBinaryDirectory(cwd); // remove all cmake commands which are not scriptable, since they can't be // used in ctest scripts diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 5ab30fc96..9fe02cb1d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1653,8 +1653,8 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath, this->LocalGenerator->GetGlobalGenerator()->AddLocalGenerator(lg2); // set the subdirs start dirs - lg2->GetMakefile()->SetStartDirectory(srcPath); - lg2->GetMakefile()->SetStartOutputDirectory(binPath); + lg2->GetMakefile()->SetCurrentSourceDirectory(srcPath); + lg2->GetMakefile()->SetCurrentBinaryDirectory(binPath); if(excludeFromAll) { lg2->GetMakefile()->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index c6090b53a..8472825a0 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -455,7 +455,7 @@ public: * recursing up the tree starting at the StartDirectory and going up until * it reaches the HomeDirectory. */ - void SetStartDirectory(const std::string& dir) + void SetCurrentSourceDirectory(const std::string& dir) { this->cmStartDirectory = dir; cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory); @@ -464,7 +464,7 @@ public: this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", this->cmStartDirectory.c_str()); } - void SetStartOutputDirectory(const std::string& dir) + void SetCurrentBinaryDirectory(const std::string& dir) { this->StartOutputDirectory = dir; cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 4120feac5..439cc5457 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -375,11 +375,11 @@ void cmake::ReadListFile(const std::vector& args, cmsys::auto_ptr lg(gg->CreateLocalGenerator()); lg->GetMakefile()->SetHomeOutputDirectory (cmSystemTools::GetCurrentWorkingDirectory()); - lg->GetMakefile()->SetStartOutputDirectory + lg->GetMakefile()->SetCurrentBinaryDirectory (cmSystemTools::GetCurrentWorkingDirectory()); lg->GetMakefile()->SetHomeDirectory (cmSystemTools::GetCurrentWorkingDirectory()); - lg->GetMakefile()->SetStartDirectory + lg->GetMakefile()->SetCurrentSourceDirectory (cmSystemTools::GetCurrentWorkingDirectory()); if (this->GetWorkingMode() != NORMAL_MODE) { diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index a279ec7a6..bd385668a 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -647,8 +647,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) { cm.SetGlobalGenerator(ggd); cmsys::auto_ptr lgd(ggd->CreateLocalGenerator()); - lgd->GetMakefile()->SetStartDirectory(startDir); - lgd->GetMakefile()->SetStartOutputDirectory(startOutDir); + lgd->GetMakefile()->SetCurrentSourceDirectory(startDir); + lgd->GetMakefile()->SetCurrentBinaryDirectory(startOutDir); // Actually scan dependencies. return lgd->UpdateDependencies(depInfo.c_str(),