From 3bf3e15def7e8a586a8f60a50c1d24866684cc9b Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Mon, 11 Mar 2024 13:40:42 +0900 Subject: [PATCH] ask for C++17 support --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21d6ba6..b4fd942 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ include(FindPackageMessage) include(GNUInstallDirs) # C++ compile flags -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_EXTENSIONS OFF) check_cxx_compiler_flag("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE) @@ -29,7 +29,7 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG ${MARCH_FLAG} ${MTUNE_FLAG}") set(gcc_like_cxx "$") add_library(compiler_flags INTERFACE) -target_compile_features(compiler_flags INTERFACE cxx_std_14) +target_compile_features(compiler_flags INTERFACE cxx_std_17) target_compile_options( compiler_flags INTERFACE "$<${gcc_like_cxx}:-Wall;-Wextra;-Wshadow;-Wformat=2;-Wunused>")