mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Add compile features for cmake 3.8+
This commit is contained in:
@ -158,6 +158,11 @@ if (FMT_PEDANTIC)
|
|||||||
target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
|
target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.8)
|
||||||
|
target_compile_features(fmt INTERFACE cxx_std_11)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
target_include_directories(fmt PUBLIC
|
target_include_directories(fmt PUBLIC
|
||||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE: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)
|
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
|
target_include_directories(fmt-header-only INTERFACE
|
||||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>)
|
$<INSTALL_INTERFACE:include>)
|
||||||
|
Reference in New Issue
Block a user