diff options
author | Zack Galbreath <zack.galbreath@kitware.com> | 2014-02-26 15:01:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-02-28 14:23:03 (GMT) |
commit | 0a6f0280672f3b1a638cae4cf5144c1adccef754 (patch) | |
tree | 543b98e816dfa434b35796a2f59f849f5a38bcbe /Source/CTest | |
parent | 14170273fe9df493fa3d0867d980889d6d08e089 (diff) | |
download | CMake-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/CTest')
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 6 |
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"); |