From cf4bc7f879e9683d29cd26f36ecc5c6655c65a38 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Mon, 9 Nov 2020 22:37:18 +0100 Subject: [PATCH] coverage: make errors fatal --- cmake/commons/CoverageFunction.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/commons/CoverageFunction.cmake b/cmake/commons/CoverageFunction.cmake index 17f3aaebdec..c5579044cf6 100644 --- a/cmake/commons/CoverageFunction.cmake +++ b/cmake/commons/CoverageFunction.cmake @@ -22,31 +22,31 @@ find_program(GENHTML_COMMAND genhtml) if(GCOV_COMMAND) set(CMAKE_GCOV_FOUND TRUE) else() - message(ERROR "could not locate gcov executable, cannot add code coverage custom target!") + message(FATAL_ERROR "could not locate gcov executable, cannot add code coverage custom target!") endif() if(LCOV_COMMAND) set(CMAKE_LCOV_FOUND TRUE) else() - message(ERROR "could not locate lcov executable, cannot add code coverage custom target!") + message(FATAL_ERROR "could not locate lcov executable, cannot add code coverage custom target!") endif() if(GENHTML_COMMAND) set(CMAKE_GENHTML_FOUND TRUE) else() - message(ERROR "could not locate genhtml executable, cannot add code coverage custom target!") + message(FATAL_ERROR "could not locate genhtml executable, cannot add code coverage custom target!") endif() if(CMAKE_C_COMPILER_ID STREQUAL "GNU") string(APPEND CMAKE_C_FLAGS " -coverage") else() - message(ERROR "C compiler is not GNU; don't know how to set code coverage flags!") + message(FATAL_ERROR "C compiler is not GNU; don't know how to set code coverage flags!") endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") string(APPEND CMAKE_CXX_FLAGS " -coverage") else() - message(ERROR "CXX compiler is not GNU; don't know how to set code coverage flags!") + message(FATAL_ERROR "CXX compiler is not GNU; don't know how to set code coverage flags!") endif() # function to add a coverage target -- GitLab