diff --git a/CMakeLists.txt b/CMakeLists.txt index b20f24fb732..3c33529de34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,19 +105,6 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -function (die msg) - if (NOT WIN32) - string(ASCII 27 Esc) - set(ColourReset "${Esc}[m") - set(BoldRed "${Esc}[1;31m") - else () - set(ColourReset "") - set(BoldRed "") - endif () - - message(FATAL_ERROR "${BoldRed}${msg}${ColourReset}") -endfunction () - function (add_c_flag_if_supported flag var) # Prepending the flag with -Werror will only add the flag, # if it doesn't result in generation of a warning of using a flag unknown to the compiler. @@ -1025,7 +1012,7 @@ set(BOOST_MIN_VER 1.62) find_package(Boost ${BOOST_MIN_VER} QUIET REQUIRED) if(NOT Boost_FOUND) - die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (>=${BOOST_MIN_VER}) or the equivalent") + message(FATAL_ERROR "Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (>=${BOOST_MIN_VER}) or the equivalent") elseif(Boost_FOUND) message(STATUS "Found Boost Version: ${Boost_VERSION_STRING}") diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index d3c9a9dec5e..223a22d2577 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -31,13 +31,13 @@ find_package(Unbound) if(NOT UNBOUND_INCLUDE_DIR) - die("Could not find libunbound") + message(FATAL_ERROR "Could not find libunbound") else() message(STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}") if(UNBOUND_LIBRARIES) message(STATUS "Found libunbound library") else() - die("Found libunbound includes, but could not find libunbound library. Please make sure you have installed libunbound or libunbound-dev or the equivalent") + message(FATAL_ERROR "Found libunbound includes, but could not find libunbound library. Please make sure you have installed libunbound or libunbound-dev or the equivalent") endif() endif()