diff options
author | Brad King <brad.king@kitware.com> | 2009-09-03 12:27:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-09-03 12:27:00 (GMT) |
commit | 3fda5c6463f3d0d263b8e58503fa622a46932d8c (patch) | |
tree | 71f9c5449eb26afcf083c4d6e45f9712e28568bb /Source | |
parent | 1db5c90644c2567af5d10b66d7be6f39441ce8ff (diff) | |
download | CMake-3fda5c6463f3d0d263b8e58503fa622a46932d8c.zip CMake-3fda5c6463f3d0d263b8e58503fa622a46932d8c.tar.gz CMake-3fda5c6463f3d0d263b8e58503fa622a46932d8c.tar.bz2 |
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 12 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 3 |
2 files changed, 12 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2546458..65ea7e7 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -99,9 +99,7 @@ void cmLocalGenerator::Configure() cmSystemTools::MakeDirectory(filesDir.c_str()); // find & read the list file - std::string currentStart = this->Makefile->GetStartDirectory(); - currentStart += "/CMakeLists.txt"; - this->Makefile->ReadListFile(currentStart.c_str()); + this->ReadInputFile(); // at the end of the ReadListFile handle any old style subdirs // first get all the subdirectories @@ -166,6 +164,14 @@ void cmLocalGenerator::ComputeObjectMaxPath() this->ObjectMaxPathViolations.clear(); } +//---------------------------------------------------------------------------- +void cmLocalGenerator::ReadInputFile() +{ + std::string currentStart = this->Makefile->GetStartDirectory(); + currentStart += "/CMakeLists.txt"; + this->Makefile->ReadListFile(currentStart.c_str()); +} + void cmLocalGenerator::SetupPathConversions() { // Setup the current output directory components for use by diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index de17c86..a1046ad 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -365,6 +365,9 @@ protected: definition. Issues a warning. */ virtual bool CheckDefinition(std::string const& define) const; + /** Read the input CMakeLists.txt file. */ + void ReadInputFile(); + cmMakefile *Makefile; cmGlobalGenerator *GlobalGenerator; // members used for relative path function ConvertToMakefilePath |