summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2014-02-26 15:01:34 (GMT)
committerBrad King <brad.king@kitware.com>2014-02-28 14:23:03 (GMT)
commit0a6f0280672f3b1a638cae4cf5144c1adccef754 (patch)
tree543b98e816dfa434b35796a2f59f849f5a38bcbe /Source
parent14170273fe9df493fa3d0867d980889d6d08e089 (diff)
downloadCMake-0a6f0280672f3b1a638cae4cf5144c1adccef754.zip
CMake-0a6f0280672f3b1a638cae4cf5144c1adccef754.tar.gz
CMake-0a6f0280672f3b1a638cae4cf5144c1adccef754.tar.bz2
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 3c65c55..0503d94 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -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");