summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-07-18 17:11:05 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-07-18 17:37:58 (GMT)
commit9ebc7502b2e4cf991e721b695aead2c366eb0bef (patch)
treefc15903bb08ee8a4a8006c30d170cd2ec7d09cb1 /Source/cmMakefile.cxx
parent27ec21dbb2370ac71aebc0089d4269f27661f4b8 (diff)
downloadCMake-9ebc7502b2e4cf991e721b695aead2c366eb0bef.zip
CMake-9ebc7502b2e4cf991e721b695aead2c366eb0bef.tar.gz
CMake-9ebc7502b2e4cf991e721b695aead2c366eb0bef.tar.bz2
cmState: Extract a Directory class.
Move Directory-scoped state accessors to it. This will be expanded with directory property state soon.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 94c77e1..0432002 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1704,7 +1704,7 @@ public:
: Makefile(mf), ReportError(true)
{
std::string currentStart =
- this->Makefile->StateSnapshot.GetCurrentSourceDirectory();
+ this->Makefile->StateSnapshot.GetDirectory().GetCurrentSource();
currentStart += "/CMakeLists.txt";
this->Makefile->StateSnapshot.SetListFile(currentStart);
this->Makefile->ListFileStack.push_back(currentStart);
@@ -1748,11 +1748,12 @@ void cmMakefile::Configure()
BuildsystemFileScope scope(this);
// make sure the CMakeFiles dir is there
- std::string filesDir = this->StateSnapshot.GetCurrentBinaryDirectory();
+ std::string filesDir = this->StateSnapshot.GetDirectory().GetCurrentBinary();
filesDir += cmake::GetCMakeFilesDirectory();
cmSystemTools::MakeDirectory(filesDir.c_str());
- std::string currentStart = this->StateSnapshot.GetCurrentSourceDirectory();
+ std::string currentStart =
+ this->StateSnapshot.GetDirectory().GetCurrentSource();
currentStart += "/CMakeLists.txt";
assert(cmSystemTools::FileExists(currentStart.c_str(), true));
this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentStart.c_str());
@@ -1884,27 +1885,27 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
void cmMakefile::SetCurrentSourceDirectory(const std::string& dir)
{
- this->StateSnapshot.SetCurrentSourceDirectory(dir);
+ this->StateSnapshot.GetDirectory().SetCurrentSource(dir);
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
- this->StateSnapshot.GetCurrentSourceDirectory());
+ this->StateSnapshot.GetDirectory().GetCurrentSource());
}
const char* cmMakefile::GetCurrentSourceDirectory() const
{
- return this->StateSnapshot.GetCurrentSourceDirectory();
+ return this->StateSnapshot.GetDirectory().GetCurrentSource();
}
void cmMakefile::SetCurrentBinaryDirectory(const std::string& dir)
{
- this->StateSnapshot.SetCurrentBinaryDirectory(dir);
- const char* binDir = this->StateSnapshot.GetCurrentBinaryDirectory();
+ this->StateSnapshot.GetDirectory().SetCurrentBinary(dir);
+ const char* binDir = this->StateSnapshot.GetDirectory().GetCurrentBinary();
cmSystemTools::MakeDirectory(binDir);
this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", binDir);
}
const char* cmMakefile::GetCurrentBinaryDirectory() const
{
- return this->StateSnapshot.GetCurrentBinaryDirectory();
+ return this->StateSnapshot.GetDirectory().GetCurrentBinary();
}
//----------------------------------------------------------------------------
@@ -4271,7 +4272,7 @@ const char *cmMakefile::GetProperty(const std::string& prop,
this->StateSnapshot.GetBuildsystemDirectoryParent();
if(parent.IsValid())
{
- return parent.GetCurrentSourceDirectory();
+ return parent.GetDirectory().GetCurrentSource();
}
return "";
}