diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9fe02cb1d7..3bbc5d8653 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& parentIncludes = parent->GetIncludeDirectoriesEntries();