Skip to content

Commit 2b36570

Browse files
committed
Merge pull request #10499
6a4eed1 cmake: remove die (tobtoht)
2 parents 5f6dbb1 + 6a4eed1 commit 2b36570

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.
@@ -944,7 +931,7 @@ set(BOOST_MIN_VER 1.62)
944931
find_package(Boost ${BOOST_MIN_VER} QUIET REQUIRED)
945932

946933
if(NOT Boost_FOUND)
947-
die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (>=${BOOST_MIN_VER}) or the equivalent")
934+
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")
948935
elseif(Boost_FOUND)
949936
message(STATUS "Found Boost Version: ${Boost_VERSION_STRING}")
950937

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)