Add check for <ranges> header

This commit is contained in:
Steffen Winter 2023-11-26 21:40:29 +01:00
parent ebbb769a6a
commit 7588d96dd4
No known key found for this signature in database
GPG key ID: D4053C3600EF3B1F

View file

@ -44,8 +44,14 @@ if(BTOP_STATIC)
endif()
include(CheckCXXCompilerFlag)
include(CheckIncludeFileCXX)
include(CheckIPOSupported)
check_include_file_cxx(ranges CXX_HAS_RANGES)
if(NOT CXX_HAS_RANGES)
message(FATAL_ERROR "The compiler doesn't support <ranges>")
endif()
add_executable(btop
src/btop.cpp
src/btop_config.cpp