diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-16 20:37:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-21 13:41:27 (GMT) |
commit | 0f3c8cfa96a3b7c426e5a9cc341410fefd2baf75 (patch) | |
tree | 46bc1ae304cd4c86106c175b24db4803b5beb604 /Source | |
parent | b288a997e9fc4f0a7ea23fc2f1439e34b5975704 (diff) | |
download | CMake-0f3c8cfa96a3b7c426e5a9cc341410fefd2baf75.zip CMake-0f3c8cfa96a3b7c426e5a9cc341410fefd2baf75.tar.gz CMake-0f3c8cfa96a3b7c426e5a9cc341410fefd2baf75.tar.bz2 |
cmMakefile: Use method abstraction to access directories.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9fe02cb..3bbc5d8 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -225,11 +225,11 @@ void cmMakefile::Print() const } std::cout << " this->StartOutputDirectory; " << - this->StartOutputDirectory << std::endl; + this->GetCurrentBinaryDirectory() << std::endl; std::cout << " this->HomeOutputDirectory; " << this->HomeOutputDirectory << std::endl; std::cout << " this->cmStartDirectory; " << - this->cmStartDirectory << std::endl; + this->GetCurrentSourceDirectory() << std::endl; std::cout << " this->cmHomeDirectory; " << this->cmHomeDirectory << std::endl; std::cout << " this->ProjectName; " @@ -526,8 +526,9 @@ bool cmMakefile::ProcessBuildsystemFile(const char* listfile) { this->AddDefinition("CMAKE_PARENT_LIST_FILE", listfile); this->cmCurrentListFile = listfile; + std::string curSrc = this->GetCurrentSourceDirectory(); return this->ReadListFile(listfile, true, - this->cmStartDirectory == this->cmHomeDirectory); + curSrc == this->GetHomeDirectory()); } bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope) @@ -535,7 +536,7 @@ bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope) this->AddDefinition("CMAKE_PARENT_LIST_FILE", this->GetCurrentListFile()); this->cmCurrentListFile = cmSystemTools::CollapseFullPath(listfile, - this->cmStartDirectory.c_str()); + this->GetCurrentSourceDirectory()); return this->ReadListFile(this->cmCurrentListFile.c_str(), noPolicyScope); } @@ -549,7 +550,7 @@ bool cmMakefile::ReadListFile(const char* listfile, { std::string filenametoread = cmSystemTools::CollapseFullPath(listfile, - this->cmStartDirectory.c_str()); + this->GetCurrentSourceDirectory()); std::string currentParentFile = this->GetSafeDefinition("CMAKE_PARENT_LIST_FILE"); @@ -1547,9 +1548,9 @@ void cmMakefile::InitializeFromParent() this->Internal->VarStack.top() = parent->Internal->VarStack.top().Closure(); this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", - this->cmStartDirectory.c_str()); + this->GetCurrentSourceDirectory()); this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", - this->StartOutputDirectory.c_str()); + this->GetCurrentBinaryDirectory()); const std::vector<cmValueWithOrigin>& parentIncludes = parent->GetIncludeDirectoriesEntries(); |