Use /W4 in format-test and only if FMT_EXTRA_TESTS is set

as (1) we don't want to force /W4 on users of the library and (2) some of
the warnings only show up when the formatting functions are used.
This commit is contained in:
vitaut
2015-03-28 17:29:12 -07:00
parent 9c75d0ccf7
commit 60405cf693
2 changed files with 4 additions and 2 deletions

View File

@@ -24,6 +24,10 @@ endif ()
add_fmt_test(gtest-extra-test)
add_fmt_test(format-test)
if (FMT_EXTRA_TESTS AND MSVC)
set_target_properties(format-test PROPERTIES COMPILE_FLAGS /W4)
endif ()
add_fmt_test(format-impl-test CUSTOM_LINK)
add_fmt_test(printf-test)
foreach (target format-test printf-test)