diff --git a/CMakeLists.txt b/CMakeLists.txt index ce9736c..6b8546f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,11 @@ cmake_minimum_required(VERSION 3.17) project(tritoncommon LANGUAGES C CXX) +# +# C++ standard +# +set(TRITON_MIN_CXX_STANDARD 17 CACHE STRING "The minimum C++ standard whose features are requested to build this target.") + # # Options # @@ -55,7 +60,7 @@ endif() add_library(common-compile-settings INTERFACE) -target_compile_features(common-compile-settings INTERFACE cxx_std_11) +target_compile_features(common-compile-settings INTERFACE cxx_std_${TRITON_MIN_CXX_STANDARD}) target_compile_options(common-compile-settings INTERFACE $<$,$,$>: