[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt 1.399 1.400 cmCTest.cxx 1.334 1.335 cmCTest.h 1.100 1.101 cmGlobalGenerator.cxx 1.234 1.235 cmGlobalUnixMakefileGenerator3.cxx 1.130 1.131
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Jul 3 09:31:32 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv18162/Source
Modified Files:
CMakeLists.txt cmCTest.cxx cmCTest.h cmGlobalGenerator.cxx
cmGlobalUnixMakefileGenerator3.cxx
Log Message:
ENH: add initial ctest -j feature
Index: cmCTest.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.h,v
retrieving revision 1.100
retrieving revision 1.101
diff -C 2 -d -r1.100 -r1.101
*** cmCTest.h 3 Feb 2008 13:57:41 -0000 1.100
--- cmCTest.h 3 Jul 2008 13:31:29 -0000 1.101
***************
*** 96,99 ****
--- 96,111 ----
double GetTimeOut() { return this->TimeOut; }
void SetTimeOut(double t) { this->TimeOut = t; }
+ // how many test to run at the same time
+ int GetParallelLevel() { return this->ParallelLevel; }
+ void SetParallelLevel(int t) { this->ParallelLevel = t; }
+
+ bool GetParallelSubprocess() { return this->ParallelSubprocess; }
+ void SetParallelSubprocess() { this->ParallelSubprocess = true; }
+
+ void SetParallelSubprocessId(int id) { this->ParallelSubprocessId = id;}
+ int GetParallelSubprocessId() { return this->ParallelSubprocessId;}
+ const char* GetParallelCacheFile()
+ { return this->ParallelCacheFile.c_str();}
+ void SetParallelCacheFile(const char* c) { this->ParallelCacheFile = c; }
/**
***************
*** 311,314 ****
--- 323,328 ----
const char* GetSpecificTrack();
+ bool GetVerbose() { return this->Verbose;}
+ bool GetExtraVerbose() { return this->ExtraVerbose;}
private:
std::string ConfigType;
***************
*** 360,363 ****
--- 374,381 ----
double TimeOut;
+ std::string ParallelCacheFile;
+ int ParallelLevel;
+ int ParallelSubprocessId;
+ bool ParallelSubprocess;
int CompatibilityMode;
Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.334
retrieving revision 1.335
diff -C 2 -d -r1.334 -r1.335
*** cmCTest.cxx 3 Feb 2008 13:57:41 -0000 1.334
--- cmCTest.cxx 3 Jul 2008 13:31:27 -0000 1.335
***************
*** 230,237 ****
--- 230,240 ----
cmCTest::cmCTest()
{
+ this->ParallelSubprocess = false;
+ this->ParallelLevel = 0;
this->SubmitIndex = 0;
this->ForceNewCTestProcess = false;
this->TomorrowTag = false;
this->Verbose = false;
+
this->Debug = false;
this->ShowLineNumbers = false;
***************
*** 803,807 ****
int update_count = 0;
! cmCTestLog(this, OUTPUT, "Start processing tests" << std::endl);
for ( cc = 0; cc < LAST_TEST; cc ++ )
--- 806,814 ----
int update_count = 0;
! // do not output startup if this is a sub-process for parallel tests
! if(!this->GetParallelSubprocess())
! {
! cmCTestLog(this, OUTPUT, "Start processing tests" << std::endl);
! }
for ( cc = 0; cc < LAST_TEST; cc ++ )
***************
*** 916,921 ****
if ( res != 0 )
{
! cmCTestLog(this, ERROR_MESSAGE, "Errors while running CTest"
! << std::endl);
}
return res;
--- 923,931 ----
if ( res != 0 )
{
! if(!this->GetParallelSubprocess())
! {
! cmCTestLog(this, ERROR_MESSAGE, "Errors while running CTest"
! << std::endl);
! }
}
return res;
***************
*** 1627,1634 ****
{
std::string arg = args[i];
! if(this->CheckArgument(arg, "--ctest-config") && i < args.size() - 1)
{
i++;
! this->CTestConfigFile= args[i];
}
--- 1637,1665 ----
{
std::string arg = args[i];
!
! if(this->CheckArgument(arg, "-j", "--parallel") && i < args.size() - 1)
{
i++;
! int plevel = atoi(args[i].c_str());
! this->SetParallelLevel(plevel);
! }
! else if(arg.find("-j") == 0)
! {
! int plevel = atoi(arg.substr(2).c_str());
! this->SetParallelLevel(plevel);
! }
! if(this->CheckArgument(arg, "--internal-ctest-parallel") && i < args.size() - 1)
! {
! i++;
! int pid = atoi(args[i].c_str());
! this->SetParallelSubprocessId(pid);
! this->SetParallelSubprocess();
! }
!
! if(this->CheckArgument(arg, "--parallel-cache") && i < args.size() - 1)
! {
! i++;
! int plevel = atoi(args[i].c_str());
! this->SetParallelCacheFile(args[i].c_str());
}
***************
*** 1967,1970 ****
--- 1998,2003 ----
else
{
+ // What is this? -V seems to be the same as -VV,
+ // and Verbose is always on in this case
this->ExtraVerbose = this->Verbose;
this->Verbose = true;
Index: cmGlobalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.cxx,v
retrieving revision 1.130
retrieving revision 1.131
diff -C 2 -d -r1.130 -r1.131
*** cmGlobalUnixMakefileGenerator3.cxx 6 Jun 2008 14:22:51 -0000 1.130
--- cmGlobalUnixMakefileGenerator3.cxx 3 Jul 2008 13:31:29 -0000 1.131
***************
*** 60,65 ****
if(!mf->GetDefinition(langComp.c_str()))
{
! cmSystemTools::Error(langComp.c_str(),
! " not set, after EnableLanguage");
continue;
}
--- 60,68 ----
if(!mf->GetDefinition(langComp.c_str()))
{
! if(!optional)
! {
! cmSystemTools::Error(langComp.c_str(),
! " not set, after EnableLanguage");
! }
continue;
}
Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.234
retrieving revision 1.235
diff -C 2 -d -r1.234 -r1.235
*** cmGlobalGenerator.cxx 10 Jun 2008 22:28:01 -0000 1.234
--- cmGlobalGenerator.cxx 3 Jul 2008 13:31:29 -0000 1.235
***************
*** 197,201 ****
void
cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
! cmMakefile *mf, bool)
{
if(languages.size() == 0)
--- 197,201 ----
void
cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
! cmMakefile *mf, bool optional)
{
if(languages.size() == 0)
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CMakeLists.txt,v
retrieving revision 1.399
retrieving revision 1.400
diff -C 2 -d -r1.399 -r1.400
*** CMakeLists.txt 18 Jun 2008 13:53:27 -0000 1.399
--- CMakeLists.txt 3 Jul 2008 13:31:26 -0000 1.400
***************
*** 315,318 ****
--- 315,319 ----
#
SET(CTEST_SRCS cmCTest.cxx
+ CTest/cmProcess.cxx
CTest/cmCTestBuildAndTestHandler.cxx
CTest/cmCTestBuildCommand.cxx
***************
*** 327,330 ****
--- 328,332 ----
CTest/cmCTestMemCheckCommand.cxx
CTest/cmCTestMemCheckHandler.cxx
+ CTest/cmCTestMultiProcessHandler.cxx
CTest/cmCTestReadCustomFilesCommand.cxx
CTest/cmCTestRunScriptCommand.cxx
***************
*** 459,460 ****
--- 461,463 ----
INSTALL_FILES(${CMAKE_DATA_DIR}/include cmCPluginAPI.h)
+
More information about the Cmake-commits
mailing list