From: Jiri Vlasak Date: Mon, 30 May 2022 14:08:10 +0000 (+0200) Subject: Require compiler version in CMakeLists X-Git-Tag: v0.10.0~1 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/hubacji1/bcar.git/commitdiff_plain/334d31fe11bbb5ed131be16b0e231ef5eaf950e9?hp=23ba2f92958c773cadd0705f36fefbf4e4d4653c Require compiler version in CMakeLists contributed by Jara --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 634f088..dd3446a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,12 @@ cmake_minimum_required(VERSION 2.8) project(bcar) +set(CMAKE_CXX_STANDARD 17) +# Require compiler version (g++ >= 7 tested) +if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7) + message(FATAL_ERROR "GCC version must be at least 7!") +endif() + #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") #set (CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")