diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8f5529fc..64784a4f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -42,6 +42,9 @@ target_compile_definitions(test-main PUBLIC FMT_USE_FILE_DESCRIPTORS=$) 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"))