move gtest-specific check into gtest/CMakeLists.txt

This commit is contained in:
Alexey Ochapov
2021-12-17 16:05:56 -08:00
committed by Victor Zverovich
parent ef72b471fc
commit 223a0fa55d
2 changed files with 7 additions and 7 deletions
-7
View File
@@ -8,13 +8,6 @@ target_link_libraries(test-main gtest)
include(CheckCXXCompilerFlag)
# Workaround GTest bug https://github.com/google/googletest/issues/705.
check_cxx_compiler_flag(
-fno-delete-null-pointer-checks HAVE_FNO_DELETE_NULL_POINTER_CHECKS)
if (HAVE_FNO_DELETE_NULL_POINTER_CHECKS)
target_compile_options(test-main PUBLIC -fno-delete-null-pointer-checks)
endif ()
# 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"))