Workaround GTest bug 705 (#268)

This commit is contained in:
vitaut 2016-02-04 08:15:19 -08:00
parent 220bb764e5
commit a4b611a3d3

View File

@ -42,6 +42,9 @@ target_compile_definitions(test-main PUBLIC
FMT_USE_FILE_DESCRIPTORS=$<BOOL:${HAVE_OPEN}>)
target_link_libraries(test-main gmock cppformat)
# Workaround GTest bug https://github.com/google/googletest/issues/705.
target_compile_options(test-main PUBLIC -fno-delete-null-pointer-checks)
# 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"))