summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-18 12:50:38 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-18 13:31:18 (GMT)
commit05245b42294a38c5f7be9b40a918e42575b7dbd7 (patch)
tree0e85f82b35fa239be6d4a63c9b48275ef3e720a6 /Source
parent6e23a4bdddd2bfee668c682a9ab4081b5e6fcfa2 (diff)
downloadCMake-05245b42294a38c5f7be9b40a918e42575b7dbd7.zip
CMake-05245b42294a38c5f7be9b40a918e42575b7dbd7.tar.gz
CMake-05245b42294a38c5f7be9b40a918e42575b7dbd7.tar.bz2
cmMakefile: Move some preamble out of the Internal method.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7790b8a..7be920d 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -556,7 +556,15 @@ bool cmMakefile::ReadListFile(const char* listfile,
std::string currentFile
= this->GetSafeDefinition("CMAKE_CURRENT_LIST_FILE");
+ this->AddDefinition("CMAKE_CURRENT_LIST_FILE", filenametoread.c_str());
+ this->AddDefinition("CMAKE_CURRENT_LIST_DIR",
+ cmSystemTools::GetFilenamePath(filenametoread).c_str());
+
this->MarkVariableAsUsed("CMAKE_PARENT_LIST_FILE");
+ this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
+ this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
+
+ this->ListFileStack.push_back(filenametoread);
bool res = this->ReadListFileInternal(filenametoread.c_str(),
noPolicyScope, requireProjectCommand);
@@ -584,14 +592,6 @@ bool cmMakefile::ReadListFileInternal(const char* filenametoread,
bool noPolicyScope,
bool requireProjectCommand)
{
- this->AddDefinition("CMAKE_CURRENT_LIST_FILE", filenametoread);
- this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
- this->AddDefinition("CMAKE_CURRENT_LIST_DIR",
- cmSystemTools::GetFilenamePath(filenametoread).c_str());
- this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
-
- // push the listfile onto the stack
- this->ListFileStack.push_back(filenametoread);
cmListFile cacheFile;
if( !cacheFile.ParseFile(filenametoread, requireProjectCommand, this) )
{