summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-08-17 19:36:08 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-08-17 19:36:08 (GMT)
commit957ddc419561b7f1e51efb7b489ffd412aeea847 (patch)
tree2c61a65439608516c906fdb68cda40c3ef4bbfb6 /Source/cmake.cxx
parent576041d492defe0fe210ecae624b9e4d764c813d (diff)
downloadCMake-957ddc419561b7f1e51efb7b489ffd412aeea847.zip
CMake-957ddc419561b7f1e51efb7b489ffd412aeea847.tar.gz
CMake-957ddc419561b7f1e51efb7b489ffd412aeea847.tar.bz2
ENH: Move PreLoad.cmake code to public method so that ccmake and CMakeSetup can call it
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx31
1 files changed, 18 insertions, 13 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 0aca69f..b8e3c24 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1179,6 +1179,22 @@ bool cmake::CacheVersionMatches()
return cacheSameCMake;
}
+void cmake::PreLoadCMakeFiles()
+{
+ std::string pre_load = this->GetHomeDirectory();
+ pre_load += "/PreLoad.cmake";
+ if ( cmSystemTools::FileExists(pre_load.c_str()) )
+ {
+ this->ReadListFile(pre_load.c_str());
+ }
+ pre_load = this->GetHomeOutputDirectory();
+ pre_load += "/PreLoad.cmake";
+ if ( cmSystemTools::FileExists(pre_load.c_str()) )
+ {
+ this->ReadListFile(pre_load.c_str());
+ }
+}
+
// handle a command line invocation
int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
{
@@ -1205,19 +1221,8 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
return -1;
}
- std::string pre_load = this->GetHomeDirectory();
- pre_load += "/PreLoad.cmake";
- if ( cmSystemTools::FileExists(pre_load.c_str()) )
- {
- this->ReadListFile(pre_load.c_str());
- }
- pre_load = this->GetHomeOutputDirectory();
- pre_load += "/PreLoad.cmake";
- if ( cmSystemTools::FileExists(pre_load.c_str()) )
- {
- this->ReadListFile(pre_load.c_str());
- }
-
+ this->PreLoadCMakeFiles();
+
std::string systemFile = this->GetHomeOutputDirectory();
systemFile += "/CMakeSystem.cmake";