summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestHandlerCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-12-19 02:57:42 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-12-19 02:57:42 (GMT)
commit5b1139caea7d732c19c584acad2a24669cdb7171 (patch)
tree1da31804a741216c3dbaa5ef61306b80973b46f5 /Source/CTest/cmCTestHandlerCommand.cxx
parent46feb1302c50d9031d25fc865d34c17e5e88c66f (diff)
downloadCMake-5b1139caea7d732c19c584acad2a24669cdb7171.zip
CMake-5b1139caea7d732c19c584acad2a24669cdb7171.tar.gz
CMake-5b1139caea7d732c19c584acad2a24669cdb7171.tar.bz2
BUG: fix for bug #8224 fix crash
Diffstat (limited to 'Source/CTest/cmCTestHandlerCommand.cxx')
-rw-r--r--Source/CTest/cmCTestHandlerCommand.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx
index 56baab6..eea8633 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -54,9 +54,7 @@ bool cmCTestHandlerCommand
return false;
}
- cmCTestLog(this->CTest, DEBUG, "Populate Custom Vectors" << std::endl;);
handler->PopulateCustomVectors(this->Makefile);
-
if ( this->Values[ct_BUILD] )
{
this->CTest->SetCTestConfiguration("BuildDirectory",
@@ -65,9 +63,20 @@ bool cmCTestHandlerCommand
}
else
{
- this->CTest->SetCTestConfiguration("BuildDirectory",
- cmSystemTools::CollapseFullPath(
- this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY")).c_str());
+ const char* bdir =
+ this->Makefile->GetSafeDefinition("CTEST_BINARY_DIRECTORY");
+ if(bdir)
+ {
+ this->
+ CTest->SetCTestConfiguration("BuildDirectory",
+ cmSystemTools::CollapseFullPath(bdir).c_str());
+ }
+ else
+ {
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "CTEST_BINARY_DIRECTORY not set" << std::endl;);
+ }
+
}
if ( this->Values[ct_SOURCE] )
{
@@ -98,7 +107,6 @@ bool cmCTestHandlerCommand
handler->SetSubmitIndex(atoi(this->Values[ct_SUBMIT_INDEX]));
}
}
-
std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::ChangeDirectory(
this->CTest->GetCTestConfiguration("BuildDirectory").c_str());