mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-04 17:26:42 +00:00
Add compile features for cmake 3.8+
This commit is contained in:
parent
07d5a86a7c
commit
3de3d76a36
@ -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>)
|
||||
|
Loading…
Reference in New Issue
Block a user