diff options
author | Ken Martin <ken.martin@kitware.com> | 2003-12-12 13:09:05 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2003-12-12 13:09:05 (GMT) |
commit | 256947ed08cbcbd82bd80fa58630f272c398f6ef (patch) | |
tree | 61abcb456421833d9faa2d51c302d36db715f5ab | |
parent | add1f25f58d6af6b3da4f859be775ee4a0defcbf (diff) | |
download | CMake-256947ed08cbcbd82bd80fa58630f272c398f6ef.zip CMake-256947ed08cbcbd82bd80fa58630f272c398f6ef.tar.gz CMake-256947ed08cbcbd82bd80fa58630f272c398f6ef.tar.bz2 |
now can do extra updates
-rw-r--r-- | Source/cmCTest.cxx | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 37f1c3f..30511d3 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2666,15 +2666,33 @@ int cmCTest::RunConfigurationScript() if (cvsCmd) { command = cvsCmd; - output.empty(); - retVal = 0; - res = cmSystemTools::RunSingleCommand(command.c_str(), &output, - &retVal, binDir, - m_Verbose, 0 /*m_TimeOut*/); - if (!res || retVal != 0) + char updateVar[40]; + int i; + for (i = 1; i < 10; ++i) { - cmSystemTools::Error("Unable to perform cvs update"); - return -5; + sprintf(updateVar,"CTEST_EXTRA_UPDATES_%i",i); + const char *updateVal = mf->GetDefinition(updateVar); + if (updateVal) + { + std::vector<std::string> cvsArgs; + cmSystemTools::ExpandListArgument(updateVal,cvsArgs); + if (cvsArgs.size() == 2) + { + std::string fullCommand = command; + fullCommand += " update "; + fullCommand += cvsArgs[1]; + output.empty(); + retVal = 0; + res = cmSystemTools::RunSingleCommand(fullCommand.c_str(), &output, + &retVal, cvsArgs[0].c_str(), + m_Verbose, 0 /*m_TimeOut*/); + if (!res || retVal != 0) + { + cmSystemTools::Error("Unable to perform extra cvs updates"); + return -5; + } + } + } } } |