Fix CMake CPP11_FLAG not being added to compile flags when FMT_EXTRA_TESTS is OFF.
This commit is contained in:
parent
0b097da31e
commit
b7febc9856
@ -75,8 +75,10 @@ if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set_target_properties(format PROPERTIES COMPILE_FLAGS
|
||||
"-Wall -Wextra -Wshadow -pedantic")
|
||||
endif ()
|
||||
if (CPP11_FLAG AND FMT_EXTRA_TESTS)
|
||||
if (CPP11_FLAG)
|
||||
set_target_properties(format PROPERTIES COMPILE_FLAGS ${CPP11_FLAG})
|
||||
endif ()
|
||||
if (FMT_EXTRA_TESTS)
|
||||
# Test compilation with default flags.
|
||||
file(GLOB src RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/*.cc test/*.h)
|
||||
add_library(testformat STATIC ${FMT_SOURCE_FILES} ${src})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user