[Cmake-commits] [cmake-commits] alex committed cmCTestScriptHandler.cxx 1.43 1.44
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Nov 7 15:56:56 EST 2008
Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv2913
Modified Files:
cmCTestScriptHandler.cxx
Log Message:
ENH: load CMakeDetermineSystem and CMakeSystemSpecificInformation when
executing a ctest script so the search paths are fully set up and variables
like CMAKE_SYSTEM are available. This is useful e.g. for new-style ctest
scripting.
(these files are also loaded on startup by cpack, so now they behave
similar).
Hmmm, maybe they should be also loaded by cmake -P ?
Alex
Index: cmCTestScriptHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestScriptHandler.cxx,v
retrieving revision 1.43
retrieving revision 1.44
diff -C 2 -d -r1.43 -r1.44
*** cmCTestScriptHandler.cxx 23 Jan 2008 15:28:01 -0000 1.43
--- cmCTestScriptHandler.cxx 7 Nov 2008 20:56:54 -0000 1.44
***************
*** 381,384 ****
--- 381,404 ----
this->Makefile->AddFunctionBlocker(f);
+ /* Execute CMakeDetermineSystem and CMakeSystemSpecificInformation, so
+ that variables like CMAKE_SYSTEM and also the search paths for libraries,
+ header and executables are set correctly and can be used. Makes new-style
+ ctest scripting easier. */
+ std::string systemFile =
+ this->Makefile->GetModulesFile("CMakeDetermineSystem.cmake");
+ if (!this->Makefile->ReadListFile(0, systemFile.c_str()) ||
+ cmSystemTools::GetErrorOccuredFlag())
+ {
+ return 2;
+ }
+
+ systemFile =
+ this->Makefile->GetModulesFile("CMakeSystemSpecificInformation.cmake");
+ if (!this->Makefile->ReadListFile(0, systemFile.c_str()) ||
+ cmSystemTools::GetErrorOccuredFlag())
+ {
+ return 2;
+ }
+
// finally read in the script
if (!this->Makefile->ReadListFile(0, script.c_str()) ||
More information about the Cmake-commits
mailing list