CTest: notify user if gcov cannot be found

Emit an error message when we're performing coverage using
gcov and the gcov executable cannot be found.
This commit is contained in:
Zack Galbreath 2014-02-26 10:01:34 -05:00 committed by Brad King
parent 14170273fe
commit 0a6f028067
1 changed files with 6 additions and 0 deletions

View File

@ -871,6 +871,12 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
{
std::string gcovCommand
= this->CTest->GetCTestConfiguration("CoverageCommand");
if (gcovCommand.empty())
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Could not find gcov." << std::endl);
return 0;
}
std::string gcovExtraFlags
= this->CTest->GetCTestConfiguration("CoverageExtraFlags");