diff options
author | Lectem <lectem@gmail.com> | 2019-04-02 00:04:03 +0200 |
---|---|---|
committer | Victor Zverovich <victor.zverovich@gmail.com> | 2019-04-07 08:47:17 -0700 |
commit | 3de3d76a36def2469759617e6159f5dc456174c7 (patch) | |
tree | fa283fee303750fbee4ff3a0525d7f487c4aa2e4 /CMakeLists.txt | |
parent | 07d5a86a7c098b3712c107f055aba70005a55f7f (diff) | |
download | fmtlib-3de3d76a36def2469759617e6159f5dc456174c7.tar.gz |
Add compile features for cmake 3.8+
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
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 $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>) @@ -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 $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>) |