summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-21 17:30:23 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-21 18:10:45 (GMT)
commitac10fc0958c94e17d89a686d1addae0ac18dc648 (patch)
tree1fa190a368731e0e022affe0ed7fbf79ca31c408 /Source
parent155ef535974ab9e78e98da00b63f31bd5c848bd0 (diff)
downloadCMake-ac10fc0958c94e17d89a686d1addae0ac18dc648.zip
CMake-ac10fc0958c94e17d89a686d1addae0ac18dc648.tar.gz
CMake-ac10fc0958c94e17d89a686d1addae0ac18dc648.tar.bz2
cmMakefile: Move listfile parsing responsibility.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx21
-rw-r--r--Source/cmMakefile.h6
2 files changed, 14 insertions, 13 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 63dbe27..56fe028 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -576,8 +576,14 @@ bool cmMakefile::ReadListFile(const char* listfile,
this->ListFileStack.push_back(filenametoread);
- bool res = this->ReadListFileInternal(filenametoread.c_str(),
- noPolicyScope, requireProjectCommand);
+ cmListFile cacheFile;
+ bool res = cacheFile.ParseFile(filenametoread.c_str(),
+ requireProjectCommand, this);
+ if (res)
+ {
+ this->ReadListFileInternal(cacheFile, filenametoread.c_str(),
+ noPolicyScope);
+ }
this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
@@ -595,15 +601,10 @@ bool cmMakefile::ReadListFile(const char* listfile,
return res;
}
-bool cmMakefile::ReadListFileInternal(const char* filenametoread,
- bool noPolicyScope,
- bool requireProjectCommand)
+bool cmMakefile::ReadListFileInternal(cmListFile const& cacheFile,
+ const char* filenametoread,
+ bool noPolicyScope)
{
- cmListFile cacheFile;
- if( !cacheFile.ParseFile(filenametoread, requireProjectCommand, this) )
- {
- return false;
- }
// add this list file to the list of dependencies
this->ListFiles.push_back( filenametoread);
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 86bde0c..0c41268 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -918,9 +918,9 @@ private:
bool noPolicyScope,
bool requireProjectCommand);
- bool ReadListFileInternal(const char* filenametoread,
- bool noPolicyScope,
- bool requireProjectCommand);
+ bool ReadListFileInternal(cmListFile const& cacheFile,
+ const char* filenametoread,
+ bool noPolicyScope);
bool ParseDefineFlag(std::string const& definition, bool remove);