[Cmake-commits] [cmake-commits] david.cole committed cmCTestConfigureCommand.cxx 1.11 1.12 cmCTestConfigureCommand.h 1.6 1.7 cmCTestConfigureHandler.cxx 1.14 1.15 cmCTestGenericHandler.cxx 1.17 1.18
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Dec 30 09:13:04 EST 2008
Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv27092/Source/CTest
Modified Files:
cmCTestConfigureCommand.cxx cmCTestConfigureCommand.h
cmCTestConfigureHandler.cxx cmCTestGenericHandler.cxx
Log Message:
ENH: Add OPTIONS argument to the ctest_configure command so that you can pass -D arguments to the cmake configure step from a ctest -S script. Also clarify/correct some not so helpful error messages.
Index: cmCTestConfigureHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestConfigureHandler.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -C 2 -d -r1.14 -r1.15
*** cmCTestConfigureHandler.cxx 30 Jan 2008 16:17:36 -0000 1.14
--- cmCTestConfigureHandler.cxx 30 Dec 2008 14:13:02 -0000 1.15
***************
*** 99,103 ****
<< "\t<StartConfigureTime>" << start_time_time
<< "</StartConfigureTime>\n";
!
if ( res == cmsysProcess_State_Exited && retVal )
{
--- 99,103 ----
<< "\t<StartConfigureTime>" << start_time_time
<< "</StartConfigureTime>\n";
!
if ( res == cmsysProcess_State_Exited && retVal )
{
***************
*** 130,134 ****
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
! "Error(s) when updating the project" << std::endl);
return -1;
}
--- 130,134 ----
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
! "Error(s) when configuring the project" << std::endl);
return -1;
}
Index: cmCTestConfigureCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestConfigureCommand.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -C 2 -d -r1.11 -r1.12
*** cmCTestConfigureCommand.cxx 11 Jul 2006 19:58:07 -0000 1.11
--- cmCTestConfigureCommand.cxx 30 Dec 2008 14:13:02 -0000 1.12
***************
*** 20,25 ****
--- 20,39 ----
#include "cmCTestGenericHandler.h"
+ cmCTestConfigureCommand::cmCTestConfigureCommand()
+ {
+ this->Arguments[ctc_OPTIONS] = "OPTIONS";
+ this->Arguments[ctc_LAST] = 0;
+ this->Last = ctc_LAST;
+ }
+
cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
{
+ std::vector<std::string> options;
+
+ if (this->Values[ctc_OPTIONS])
+ {
+ cmSystemTools::ExpandListArgument(this->Values[ctc_OPTIONS], options);
+ }
+
if ( this->Values[ct_BUILD] )
{
***************
*** 34,37 ****
--- 48,52 ----
this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY")).c_str());
}
+
if ( this->Values[ct_SOURCE] )
{
***************
*** 46,49 ****
--- 61,65 ----
this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")).c_str());
}
+
if ( this->CTest->GetCTestConfiguration("BuildDirectory").empty() )
{
***************
*** 78,86 ****
std::string cmakeConfigureCommand = "\"";
cmakeConfigureCommand += this->CTest->GetCMakeExecutable();
! cmakeConfigureCommand += "\" \"-G";
cmakeConfigureCommand += cmakeGeneratorName;
! cmakeConfigureCommand += "\" \"";
cmakeConfigureCommand += source_dir;
cmakeConfigureCommand += "\"";
this->CTest->SetCTestConfiguration("ConfigureCommand",
cmakeConfigureCommand.c_str());
--- 94,117 ----
std::string cmakeConfigureCommand = "\"";
cmakeConfigureCommand += this->CTest->GetCMakeExecutable();
! cmakeConfigureCommand += "\"";
!
! std::vector<std::string>::const_iterator it;
! std::string option;
! for (it= options.begin(); it!=options.end(); ++it)
! {
! option = *it;
! cmakeConfigureCommand += " \"";
! cmakeConfigureCommand += option;
! cmakeConfigureCommand += "\"";
! }
!
! cmakeConfigureCommand += " \"-G";
cmakeConfigureCommand += cmakeGeneratorName;
! cmakeConfigureCommand += "\"";
!
! cmakeConfigureCommand += " \"";
cmakeConfigureCommand += source_dir;
cmakeConfigureCommand += "\"";
+
this->CTest->SetCTestConfiguration("ConfigureCommand",
cmakeConfigureCommand.c_str());
***************
*** 105,108 ****
return handler;
}
-
-
--- 136,137 ----
Index: cmCTestConfigureCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestConfigureCommand.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C 2 -d -r1.6 -r1.7
*** cmCTestConfigureCommand.h 12 May 2008 13:11:51 -0000 1.6
--- cmCTestConfigureCommand.h 30 Dec 2008 14:13:02 -0000 1.7
***************
*** 28,33 ****
{
public:
!
! cmCTestConfigureCommand() {}
/**
--- 28,32 ----
{
public:
! cmCTestConfigureCommand();
/**
***************
*** 61,68 ****
{
return
! " ctest_configure(BUILD build_dir RETURN_VALUE res)\n"
"Configures the given build directory and stores results in "
! "Configure.xml. The second argument is a variable that will hold "
! "return value.";
}
--- 60,69 ----
{
return
! " ctest_configure(BUILD build_dir OPTIONS options RETURN_VALUE res)\n"
"Configures the given build directory and stores results in "
! "Configure.xml. The OPTIONS arguments are passed as command line "
! "arguments to the configure command. "
! "The RETURN_VALUE argument is a variable that will hold "
! "the return value.";
}
***************
*** 72,75 ****
--- 73,81 ----
cmCTestGenericHandler* InitializeHandler();
+ enum {
+ ctc_FIRST = ct_LAST,
+ ctc_OPTIONS,
+ ctc_LAST
+ };
};
Index: cmCTestGenericHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestGenericHandler.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -C 2 -d -r1.17 -r1.18
*** cmCTestGenericHandler.cxx 3 Jul 2008 13:31:30 -0000 1.17
--- cmCTestGenericHandler.cxx 30 Dec 2008 14:13:02 -0000 1.18
***************
*** 124,129 ****
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
! "Current Tag empty, this may mean"
! " NightlyStartTime was not set correctly." << std::endl);
cmSystemTools::SetFatalErrorOccured();
return false;
--- 124,131 ----
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
! "Current Tag empty, this may mean NightlyStartTime / "
! "CTEST_NIGHTLY_START_TIME was not set correctly. Or "
! "maybe you forgot to call ctest_start() before calling "
! "ctest_configure()." << std::endl);
cmSystemTools::SetFatalErrorOccured();
return false;
***************
*** 176,178 ****
return true;
}
-
--- 178,179 ----
More information about the Cmake-commits
mailing list