diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-18 12:50:36 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-18 13:29:20 (GMT) |
commit | 5d4480a8c711a3d5971e100cc1a8984b6305c509 (patch) | |
tree | d0f60c71726f93c6b2ca50395ea38cdfebdaef11 | |
parent | 3a8ac2423ef658e87e366a143428835be48bf88f (diff) | |
download | CMake-5d4480a8c711a3d5971e100cc1a8984b6305c509.zip CMake-5d4480a8c711a3d5971e100cc1a8984b6305c509.tar.gz CMake-5d4480a8c711a3d5971e100cc1a8984b6305c509.tar.bz2 |
cmMakefile: Populate CMAKE_PARENT_LIST_FILE in callers.
Because all external callers of this method pass a null first
parameter, this change has no effect for them.
This also makes it obvious that the CMAKE_PARENT_LIST_FILE is set to
the name of the file being read itself for CMakeLists.txt files,
which may not make any sense.
-rw-r--r-- | Source/cmMakefile.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9a57223..7f4fbc1 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -524,12 +524,14 @@ void cmMakefile::IncludeScope::EnforceCMP0011() bool cmMakefile::ProcessBuildsystemFile(const char* listfile) { + this->AddDefinition("CMAKE_PARENT_LIST_FILE", listfile); return this->ReadListFile(listfile, 0, true, this->cmStartDirectory == this->cmHomeDirectory); } bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope) { + this->AddDefinition("CMAKE_PARENT_LIST_FILE", this->GetCurrentListFile()); return this->ReadListFile(this->GetCurrentListFile(), listfile, noPolicyScope); } @@ -572,7 +574,6 @@ bool cmMakefile::ReadListFile(const char* filename_in, std::string currentFile = this->GetSafeDefinition("CMAKE_CURRENT_LIST_FILE"); - this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename_in); this->MarkVariableAsUsed("CMAKE_PARENT_LIST_FILE"); bool res = this->ReadListFileInternal(filenametoread.c_str(), |