From a4b611a3d3e170c704fd17416d2dc2890b0a514c Mon Sep 17 00:00:00 2001 From: vitaut Date: Thu, 4 Feb 2016 08:15:19 -0800 Subject: [PATCH] Workaround GTest bug 705 (#268) --- test/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) 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"))