Commit df31c576 authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

ENH: Add support for automatically preloaded cmake file. Closes Bug #802 - Add...

ENH: Add support for automatically preloaded cmake file. Closes Bug #802 - Add auto preload file support in CMake
parent ddf814f9
......@@ -1160,6 +1160,13 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
cmSystemTools::Error("Problem processing arguments. Aborting.\n");
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";
......
......@@ -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)
SET(THIS_SHOULD_BE_SET ON CACHE BOOL "Some variable")
Supports Markdown
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