From 3de3d76a36def2469759617e6159f5dc456174c7 Mon Sep 17 00:00:00 2001 From: Lectem Date: Tue, 2 Apr 2019 00:04:03 +0200 Subject: [PATCH] Add compile features for cmake 3.8+ --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80d75e72..b036f60a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,6 +158,11 @@ if (FMT_PEDANTIC) target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS}) endif () +if (NOT ${CMAKE_VERSION} VERSION_LESS 3.8) + target_compile_features(fmt INTERFACE cxx_std_11) +endif () + + target_include_directories(fmt PUBLIC $ $) @@ -180,6 +185,10 @@ add_library(fmt::fmt-header-only ALIAS fmt-header-only) target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1) +if (NOT ${CMAKE_VERSION} VERSION_LESS 3.8) + target_compile_features(fmt-header-only INTERFACE cxx_std_11) +endif () + target_include_directories(fmt-header-only INTERFACE $ $)