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:31:11 (GMT) |
commit | 9db15954104455fef54d59c7aa029d798075bf0e (patch) | |
tree | c2af7f909cf937b411e01d5ae779f7e1df99d564 /Source | |
parent | 5d4480a8c711a3d5971e100cc1a8984b6305c509 (diff) | |
download | CMake-9db15954104455fef54d59c7aa029d798075bf0e.zip CMake-9db15954104455fef54d59c7aa029d798075bf0e.tar.gz CMake-9db15954104455fef54d59c7aa029d798075bf0e.tar.bz2 |
cmMakefile: Move condition to the only calling context where it is true.
Call the Internal method with equivalent parameters, passing a null first
argument.
A duplicate path computation exists inside the external_in condition now,
but that is harmless at this point.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 7f4fbc1..9b2ee35 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -532,7 +532,11 @@ bool cmMakefile::ProcessBuildsystemFile(const char* listfile) bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope) { this->AddDefinition("CMAKE_PARENT_LIST_FILE", this->GetCurrentListFile()); - return this->ReadListFile(this->GetCurrentListFile(), listfile, + std::string filenametoread = + cmSystemTools::CollapseFullPath(listfile, + this->cmStartDirectory.c_str()); + this->cmCurrentListFile = filenametoread; + return this->ReadListFile(0, filenametoread.c_str(), noPolicyScope); } @@ -550,13 +554,6 @@ bool cmMakefile::ReadListFile(const char* filename_in, filenametoread = filename_in; } - if (external_in && filename_in) - { - filenametoread = - cmSystemTools::CollapseFullPath(filename_in, - this->cmStartDirectory.c_str()); - } - if (!filenametoread.empty()) { this->cmCurrentListFile = filenametoread; |