Commit 3fda5c64 authored by Brad King's avatar Brad King
Browse files

Factor cmLocalGenerator::Configure input file read

This method tells the cmMakefile to read the input CMakeLists.txt file.
We factor out the call into a ReadInputFile method so it can be extended
without polluting the Configure method.
parent 1db5c906
...@@ -99,9 +99,7 @@ void cmLocalGenerator::Configure() ...@@ -99,9 +99,7 @@ void cmLocalGenerator::Configure()
cmSystemTools::MakeDirectory(filesDir.c_str()); cmSystemTools::MakeDirectory(filesDir.c_str());
// find & read the list file // find & read the list file
std::string currentStart = this->Makefile->GetStartDirectory(); this->ReadInputFile();
currentStart += "/CMakeLists.txt";
this->Makefile->ReadListFile(currentStart.c_str());
// at the end of the ReadListFile handle any old style subdirs // at the end of the ReadListFile handle any old style subdirs
// first get all the subdirectories // first get all the subdirectories
...@@ -166,6 +164,14 @@ void cmLocalGenerator::ComputeObjectMaxPath() ...@@ -166,6 +164,14 @@ void cmLocalGenerator::ComputeObjectMaxPath()
this->ObjectMaxPathViolations.clear(); this->ObjectMaxPathViolations.clear();
} }
//----------------------------------------------------------------------------
void cmLocalGenerator::ReadInputFile()
{
std::string currentStart = this->Makefile->GetStartDirectory();
currentStart += "/CMakeLists.txt";
this->Makefile->ReadListFile(currentStart.c_str());
}
void cmLocalGenerator::SetupPathConversions() void cmLocalGenerator::SetupPathConversions()
{ {
// Setup the current output directory components for use by // Setup the current output directory components for use by
......
...@@ -365,6 +365,9 @@ protected: ...@@ -365,6 +365,9 @@ protected:
definition. Issues a warning. */ definition. Issues a warning. */
virtual bool CheckDefinition(std::string const& define) const; virtual bool CheckDefinition(std::string const& define) const;
/** Read the input CMakeLists.txt file. */
void ReadInputFile();
cmMakefile *Makefile; cmMakefile *Makefile;
cmGlobalGenerator *GlobalGenerator; cmGlobalGenerator *GlobalGenerator;
// members used for relative path function ConvertToMakefilePath // members used for relative path function ConvertToMakefilePath
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment