diff options
author | Ken Martin <ken.martin@kitware.com> | 2004-01-16 19:00:30 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2004-01-16 19:00:30 (GMT) |
commit | d4e3804f4e3edf6c3f557274b6e392d29c3a3be9 (patch) | |
tree | a57aef9f0b45ab0cfa247e7604f61338b3d37a75 /Source/cmCTest.cxx | |
parent | e5a48ea03141060c39c46172c6aa87e26dbb4fb7 (diff) | |
download | CMake-d4e3804f4e3edf6c3f557274b6e392d29c3a3be9.zip CMake-d4e3804f4e3edf6c3f557274b6e392d29c3a3be9.tar.gz CMake-d4e3804f4e3edf6c3f557274b6e392d29c3a3be9.tar.bz2 |
fix so that ctest is run even with bad cmake result
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 69c5112..0b89e2d 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -3056,7 +3056,7 @@ int cmCTest::RunConfigurationScript() int retVal = 0; bool res; - // do an initial cvs update on the src dir + // do an initial cvs update as required const char *cvsCmd = mf->GetDefinition("CTEST_CVS_COMMAND"); if (cvsCmd) { @@ -3114,6 +3114,7 @@ int cmCTest::RunConfigurationScript() // do an initial cmake to setup the DartConfig file const char *cmakeCmd = mf->GetDefinition("CTEST_CMAKE_COMMAND"); + int cmakeFailed = 0; if (cmakeCmd) { command = cmakeCmd; @@ -3127,8 +3128,8 @@ int cmCTest::RunConfigurationScript() m_Verbose, 0 /*m_TimeOut*/); if (!res || retVal != 0) { - cmSystemTools::Error("Unable to run cmake"); - return -7; + // even if this fails continue to the next step + cmakeFailed = 1; } } @@ -3141,7 +3142,7 @@ int cmCTest::RunConfigurationScript() m_Verbose, 0 /*m_TimeOut*/); // did something critical fail in ctest - if (!res || + if (!res || cmakeFailed || retVal & CTEST_BUILD_ERRORS) { // if we backed up the dirs and the build failed, then restore @@ -3161,6 +3162,11 @@ int cmCTest::RunConfigurationScript() rename(backupSrcDir.c_str(), srcDir); rename(backupBinDir.c_str(), binDir); } + if (cmakeFailed) + { + cmSystemTools::Error("Unable to run cmake"); + return -7; + } cmSystemTools::Error("Unable to run ctest"); if (!res) { |