Commit c0e92610 authored by Mario Werner's avatar Mario Werner

use the same warning options like before the PR

Additional notes on how to improve the current state have been added.
parent b05a02b9
......@@ -39,8 +39,6 @@ include(testCxx11)
if (CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
set(PEDANTIC_COMPILE_FLAGS -Wall -Wextra -Wshadow -pedantic)
elseif (MSVC)
set(PEDANTIC_COMPILE_FLAGS /W4)
endif ()
if (CMAKE_GENERATOR MATCHES "Visual Studio")
......
......@@ -39,6 +39,7 @@ endif ()
set(TEST_MAIN_SRC test-main.cc gtest-extra.cc gtest-extra.h util.cc)
# relax pedantic flags for the tests
# TODO: fix warnings in tests to make this redundant. (e.g. -Wshadow,...)
if (CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
set(PEDANTIC_COMPILE_FLAGS -Wall -Wextra -pedantic -Wno-long-long -Wno-variadic-macros)
endif ()
......@@ -69,6 +70,13 @@ add_fmt_test(format-impl-test)
add_fmt_test(printf-test)
add_fmt_test(util-test mock-allocator.h)
# Enable stricter options for one test to make sure that the header is free of
# warnings.
# TODO: make all tests warning free and add this flag to PEDANTIC_COMPILE_FLAGS
if (FMT_PEDANTIC AND MSVC)
target_compile_options(format-test PRIVATE /W4)
endif ()
add_executable(macro-test macro-test.cc ${TEST_MAIN_SRC})
target_link_libraries(macro-test gmock cppformat)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment