summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-03-04 16:24:57 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-03-04 16:24:57 (GMT)
commite7f16fcb1b1d116443ca19082aa2e05d92430b0a (patch)
tree264a0c429f8677c9403007c591ef9e2f9f270430
parent726114077d76fd0a8222aae6d5da8846994d787e (diff)
downloadCMake-e7f16fcb1b1d116443ca19082aa2e05d92430b0a.zip
CMake-e7f16fcb1b1d116443ca19082aa2e05d92430b0a.tar.gz
CMake-e7f16fcb1b1d116443ca19082aa2e05d92430b0a.tar.bz2
BUG: make sure error condition is reset before loading scripts
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index ef8e924..f44e7ca 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -369,6 +369,9 @@ void cmCTestScriptHandler::GetCommandDocumentation(
// cmake instance and generators, and then reads in the script
int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
{
+ // Reset the error flag so that the script is read in no matter what
+ cmSystemTools::ResetErrorOccuredFlag();
+
// if the argument has a , in it then it needs to be broken into the fist
// argument (which is the script) and the second argument which will be
// passed into the scripts as S_ARG
@@ -379,7 +382,6 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
script = total_script_arg.substr(0,total_script_arg.find(","));
script_arg = total_script_arg.substr(total_script_arg.find(",")+1);
}
-
// make sure the file exists
if (!cmSystemTools::FileExists(script.c_str()))
{
@@ -414,6 +416,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
f->CTestScriptHandler = this;
this->Makefile->AddFunctionBlocker(f);
+
/* Execute CMakeDetermineSystem and CMakeSystemSpecificInformation, so
that variables like CMAKE_SYSTEM and also the search paths for libraries,
header and executables are set correctly and can be used. Makes new-style
@@ -422,7 +425,9 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
this->Makefile->GetModulesFile("CMakeDetermineSystem.cmake");
if (!this->Makefile->ReadListFile(0, systemFile.c_str()) ||
cmSystemTools::GetErrorOccuredFlag())
- {
+ {
+ cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:"
+ << systemFile.c_str() << "\n");
return 2;
}
@@ -431,8 +436,8 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
if (!this->Makefile->ReadListFile(0, systemFile.c_str()) ||
cmSystemTools::GetErrorOccuredFlag())
{
- cmCTestLog(this->CTest, DEBUG, "Error in read: " << systemFile.c_str()
- << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:"
+ << systemFile.c_str() << "\n");
return 2;
}
@@ -440,7 +445,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
if (!this->Makefile->ReadListFile(0, script.c_str()) ||
cmSystemTools::GetErrorOccuredFlag())
{
- cmCTestLog(this->CTest, DEBUG, "Error in read script: "
+ cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read script: "
<< script.c_str()
<< std::endl);
return 2;