ENH: Add support for automatically preloaded cmake file. Closes Bug #802 - Add auto preload file support in CMake

This commit is contained in:
Andy Cedilnik 2004-04-28 10:52:20 -04:00
parent ddf814f964
commit df31c576dc
3 changed files with 18 additions and 0 deletions

View File

@ -1161,6 +1161,13 @@ 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());
}
std::string systemFile = this->GetHomeOutputDirectory();
systemFile += "/CMakeSystem.cmake";

View File

@ -23,3 +23,13 @@ ELSE(DUMP_DOC_EXE)
ENDIF(DUMP_DOC_EXE)
ADD_EXECUTABLE(CommandLineTest CommandLineTest.cxx)
IF(THIS_SHOULD_BE_SET)
MESSAGE(STATUS "***************************")
MESSAGE(STATUS "PreLoad.cmake works fine.")
MESSAGE(STATUS "***************************")
ELSE(THIS_SHOULD_BE_SET)
MESSAGE("***************************")
MESSAGE(FATAL_ERROR "PreLoad.cmake does not work.")
ENDIF(THIS_SHOULD_BE_SET)

View File

@ -0,0 +1 @@
SET(THIS_SHOULD_BE_SET ON CACHE BOOL "Some variable")