|
|
@@ -1647,33 +1647,27 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
|
|
|
|
|
|
void cmMakefile::SetCurrentSourceDirectory(const std::string& dir)
|
|
|
{
|
|
|
- this->cmStartDirectory = dir;
|
|
|
- cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory);
|
|
|
- this->cmStartDirectory =
|
|
|
- cmSystemTools::CollapseFullPath(this->cmStartDirectory);
|
|
|
+ this->StateSnapshot.SetCurrentSourceDirectory(dir);
|
|
|
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
|
|
|
- this->cmStartDirectory.c_str());
|
|
|
+ this->StateSnapshot.GetCurrentSourceDirectory());
|
|
|
}
|
|
|
|
|
|
const char* cmMakefile::GetCurrentSourceDirectory() const
|
|
|
{
|
|
|
- return this->cmStartDirectory.c_str();
|
|
|
+ return this->StateSnapshot.GetCurrentSourceDirectory();
|
|
|
}
|
|
|
|
|
|
void cmMakefile::SetCurrentBinaryDirectory(const std::string& dir)
|
|
|
{
|
|
|
- this->StartOutputDirectory = dir;
|
|
|
- cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory);
|
|
|
- this->StartOutputDirectory =
|
|
|
- cmSystemTools::CollapseFullPath(this->StartOutputDirectory);
|
|
|
- cmSystemTools::MakeDirectory(this->StartOutputDirectory.c_str());
|
|
|
- this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
|
|
|
- this->StartOutputDirectory.c_str());
|
|
|
+ this->StateSnapshot.SetCurrentBinaryDirectory(dir);
|
|
|
+ const char* binDir = this->StateSnapshot.GetCurrentBinaryDirectory();
|
|
|
+ cmSystemTools::MakeDirectory(binDir);
|
|
|
+ this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", binDir);
|
|
|
}
|
|
|
|
|
|
const char* cmMakefile::GetCurrentBinaryDirectory() const
|
|
|
{
|
|
|
- return this->StartOutputDirectory.c_str();
|
|
|
+ return this->StateSnapshot.GetCurrentBinaryDirectory();
|
|
|
}
|
|
|
|
|
|
//----------------------------------------------------------------------------
|