diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-18 12:50:31 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-18 13:29:17 (GMT) |
commit | 68f791cd06983e8fd375edfba74a9d821231e269 (patch) | |
tree | 3735005251b63f52356415298a149c900bddbf88 /Source/cmMakefile.cxx | |
parent | 5bb4248a807029053156dbf4a3cdba4427766306 (diff) | |
download | CMake-68f791cd06983e8fd375edfba74a9d821231e269.zip CMake-68f791cd06983e8fd375edfba74a9d821231e269.tar.gz CMake-68f791cd06983e8fd375edfba74a9d821231e269.tar.bz2 |
cmMakefile: Add a method for processing buildsystem files.
These are different from other ListFiles in that a project() command is
required if it is top-level.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8bc4ac8..b08725e 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -522,12 +522,19 @@ void cmMakefile::IncludeScope::EnforceCMP0011() } } +bool cmMakefile::ProcessBuildsystemFile(const char* listfile) +{ + return this->ReadListFile(listfile, 0, true, + this->cmStartDirectory == this->cmHomeDirectory); +} + //---------------------------------------------------------------------------- // Parse the given CMakeLists.txt file executing all commands // bool cmMakefile::ReadListFile(const char* filename_in, const char *external_in, - bool noPolicyScope) + bool noPolicyScope, + bool requireProjectCommand) { std::string currentParentFile = this->GetSafeDefinition("CMAKE_PARENT_LIST_FILE"); @@ -580,21 +587,6 @@ bool cmMakefile::ReadListFile(const char* filename_in, cmSystemTools::GetFilenamePath(filenametoread).c_str()); this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR"); - // try to see if the list file is the top most - // list file for a project, and if it is, then it - // must have a project command. If there is not - // one, then cmake will provide one via the - // cmListFileCache class. - bool requireProjectCommand = false; - if(!external && this->cmStartDirectory == this->cmHomeDirectory) - { - if(cmSystemTools::LowerCase( - cmSystemTools::GetFilenameName(filename)) == "cmakelists.txt") - { - requireProjectCommand = true; - } - } - // push the listfile onto the stack this->ListFileStack.push_back(filenametoread); cmListFile cacheFile; |