summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2004-08-23 15:29:27 (GMT)
committerKen Martin <ken.martin@kitware.com>2004-08-23 15:29:27 (GMT)
commit1a1be539ee71479b539df261b288516d7399a98f (patch)
tree3c1e81371d51bf7d02359f955acd297a2b4f31ea
parent049985f36f840841b4fd2c5ed273fbde2c889c1b (diff)
downloadCMake-1a1be539ee71479b539df261b288516d7399a98f.zip
CMake-1a1be539ee71479b539df261b288516d7399a98f.tar.gz
CMake-1a1be539ee71479b539df261b288516d7399a98f.tar.bz2
now will check out src dir if it has the necc info
-rw-r--r--Source/cmCTest.cxx24
1 files changed, 23 insertions, 1 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 7cfa98b..855f059 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -3731,7 +3731,7 @@ int cmCTest::RunConfigurationScript(const std::string& total_script_arg)
ctestRoot = new char [cmSystemTools::GetFilenamePath(srcDir).size()+1];
strcpy(ctestRoot,cmSystemTools::GetFilenamePath(srcDir).c_str());
}
-
+
// now that we have done most of the error checking finally run the
// dashboard, we may be asked to repeatedly run this dashboard, such as
// for a continuous
@@ -3786,6 +3786,8 @@ int cmCTest::RunConfigurationScript(const std::string& total_script_arg)
return returnValue;
}
+// this function (and the one above it) is too long and will soon be
+// refactored into a seperate class for processing the -S functionality.
int cmCTest::RunConfigurationDashboard(cmMakefile *mf,
const char *srcDir, const char *binDir,
const char *ctestRoot,
@@ -3800,6 +3802,26 @@ int cmCTest::RunConfigurationDashboard(cmMakefile *mf,
int retVal = 0;
bool res;
+ // make sure the src directory is there, if it isn't then we might be able
+ // to check it out from cvs
+ if (!cmSystemTools::FileExists(srcDir) && cvsCheckOut)
+ {
+ // we must now checkout the src dir
+ output = "";
+ if ( m_Verbose )
+ {
+ std::cerr << "Run cvs: " << cvsCheckOut << std::endl;
+ }
+ res = cmSystemTools::RunSingleCommand(cvsCheckOut, &output,
+ &retVal, ctestRoot,
+ m_Verbose, 0 /*m_TimeOut*/);
+ if (!res || retVal != 0)
+ {
+ cmSystemTools::Error("Unable to perform cvs checkout ");
+ return 6;
+ }
+ }
+
// compute the backup names
std::string backupSrcDir = srcDir;
backupSrcDir += "_CMakeBackup";