Skip to content

Commit 6a4eed1

Browse files
committed
cmake: remove die
1 parent 9d7ba46 commit 6a4eed1

2 files changed

Lines changed: 3 additions & 16 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,6 @@ set(CMAKE_CXX_STANDARD 17)
105105
set(CMAKE_CXX_STANDARD_REQUIRED ON)
106106
set(CMAKE_CXX_EXTENSIONS OFF)
107107

108-
function (die msg)
109-
if (NOT WIN32)
110-
string(ASCII 27 Esc)
111-
set(ColourReset "${Esc}[m")
112-
set(BoldRed "${Esc}[1;31m")
113-
else ()
114-
set(ColourReset "")
115-
set(BoldRed "")
116-
endif ()
117-
118-
message(FATAL_ERROR "${BoldRed}${msg}${ColourReset}")
119-
endfunction ()
120-
121108
function (add_c_flag_if_supported flag var)
122109
# Prepending the flag with -Werror will only add the flag,
123110
# 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)
10251012
find_package(Boost ${BOOST_MIN_VER} QUIET REQUIRED)
10261013

10271014
if(NOT Boost_FOUND)
1028-
die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (>=${BOOST_MIN_VER}) or the equivalent")
1015+
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")
10291016
elseif(Boost_FOUND)
10301017
message(STATUS "Found Boost Version: ${Boost_VERSION_STRING}")
10311018

external/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
find_package(Unbound)
3232

3333
if(NOT UNBOUND_INCLUDE_DIR)
34-
die("Could not find libunbound")
34+
message(FATAL_ERROR "Could not find libunbound")
3535
else()
3636
message(STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}")
3737
if(UNBOUND_LIBRARIES)
3838
message(STATUS "Found libunbound library")
3939
else()
40-
die("Found libunbound includes, but could not find libunbound library. Please make sure you have installed libunbound or libunbound-dev or the equivalent")
40+
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")
4141
endif()
4242
endif()
4343

0 commit comments

Comments
 (0)