]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/fmt/test/gtest/CMakeLists.txt
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / fmt / test / gtest / CMakeLists.txt
index 1282d62afac659e12c65d96d8fd119c167aac827..ed0e59d5fc57c46f69dba2b8969cb7bdaa71d06f 100644 (file)
@@ -17,6 +17,13 @@ else ()
   target_compile_definitions(gtest PUBLIC GTEST_HAS_PTHREAD=0)
 endif ()
 
+# Workaround GTest bug https://github.com/google/googletest/issues/705.
+fmt_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(gtest PUBLIC -fno-delete-null-pointer-checks)
+endif ()
+
 if (MSVC)
   # Disable MSVC warnings of _CRT_INSECURE_DEPRECATE functions.
   target_compile_definitions(gtest PRIVATE _CRT_SECURE_NO_WARNINGS)