diff --git a/CMakeLists.txt b/CMakeLists.txt index fb650f41..e1f57bb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -297,7 +297,11 @@ if (FMT_PEDANTIC) target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS}) endif () -target_compile_features(fmt PUBLIC cxx_std_11) +if (cxx_std_11 IN_LIST CMAKE_CXX_COMPILE_FEATURES) + target_compile_features(fmt PUBLIC cxx_std_11) +else () + message(WARNING "Feature cxx_std_11 is unknown for the CXX compiler") +endif () target_include_directories(fmt ${FMT_SYSTEM_HEADERS_ATTRIBUTE} PUBLIC $