FMT_USE_FILE_DESCRIPTORS is apparently only needed for the tests

This commit is contained in:
Mario Werner 2016-02-03 09:14:32 +01:00
parent c0e926109e
commit e0e8f717a0
2 changed files with 2 additions and 4 deletions

View File

@ -12,9 +12,6 @@ if (FMT_PEDANTIC)
target_compile_options(cppformat PRIVATE ${PEDANTIC_COMPILE_FLAGS})
endif ()
target_compile_definitions(cppformat INTERFACE
FMT_USE_FILE_DESCRIPTORS=$<BOOL:${HAVE_OPEN}>)
target_include_directories(cppformat INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>)

View File

@ -56,7 +56,8 @@ function(add_fmt_test name)
# define if certain c++ features can be used
target_compile_definitions(${name} PRIVATE
FMT_USE_TYPE_TRAITS=$<BOOL:${SUPPORTS_TYPE_TRAITS}>
FMT_USE_ENUM_BASE=$<BOOL:${SUPPORTS_ENUM_BASE}>)
FMT_USE_ENUM_BASE=$<BOOL:${SUPPORTS_ENUM_BASE}>
FMT_USE_FILE_DESCRIPTORS=$<BOOL:${HAVE_OPEN}>)
if (FMT_PEDANTIC)
target_compile_options(${name} PRIVATE ${PEDANTIC_COMPILE_FLAGS})
endif ()