ctest_memcheck: Do not open empty BC output file name

In cmCTestMemCheckHandler::PostProcessBoundsCheckerTest return early
if the output file name is empty.  We already do this in the similar
cmCTestMemCheckHandler::AppendMemTesterOutput method.
This commit is contained in:
Brad King 2014-12-16 13:47:35 -05:00
parent 29533380ea
commit 1c8129795a
1 changed files with 4 additions and 0 deletions

View File

@ -1202,6 +1202,10 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
return; return;
} }
std::string ofile = files[0]; std::string ofile = files[0];
if ( ofile.empty() )
{
return;
}
// put a scope around this to close ifs so the file can be removed // put a scope around this to close ifs so the file can be removed
{ {
cmsys::ifstream ifs(ofile.c_str()); cmsys::ifstream ifs(ofile.c_str());