diff --git a/CMakeLists.txt b/CMakeLists.txt index 80d75e728581..760ff1fee98b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} include(cxx14) include(CheckCXXCompilerFlag) +set(FMT_REQUIRED_FEATURES cxx_auto_type cxx_variadic_templates) + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") set(PEDANTIC_COMPILE_FLAGS -pedantic-errors -Wall -Wextra -pedantic -Wold-style-cast -Wundef @@ -158,6 +160,8 @@ if (FMT_PEDANTIC) target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS}) endif () +target_compile_features(fmt INTERFACE ${FMT_REQUIRED_FEATURES}) + target_include_directories(fmt PUBLIC $ $) @@ -180,6 +184,8 @@ add_library(fmt::fmt-header-only ALIAS fmt-header-only) target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1) +target_compile_features(fmt-header-only INTERFACE ${FMT_REQUIRED_FEATURES}) + target_include_directories(fmt-header-only INTERFACE $ $)