Skip to content

Commit

Permalink
Use less strict pedantic flags for tests because of GMock (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Mar 18, 2016
1 parent 030cccf commit 0c901ef
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ if (HAVE_FNO_DELETE_NULL_POINTER_CHECKS)
target_compile_options(test-main PUBLIC -fno-delete-null-pointer-checks)
endif ()

# relax pedantic flags for the tests
# TODO: fix warnings in tests to make this redundant. (e.g. -Wshadow,...)
# Use less strict pedantic flags for the tests because GMock doesn't compile
# cleanly with -pedantic and -std=c++98.
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)
set(PEDANTIC_COMPILE_FLAGS -Wall -Wextra -Wno-long-long -Wno-variadic-macros)
endif ()

# Adds a test.
Expand Down Expand Up @@ -78,7 +78,6 @@ add_fmt_test(macro-test)

# 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 ()
Expand Down

0 comments on commit 0c901ef

Please sign in to comment.