mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Check if -fno-delete-null-pointer-checks flag is supported
This commit is contained in:
parent
a4b611a3d3
commit
1adee75e1c
@ -43,7 +43,11 @@ target_compile_definitions(test-main PUBLIC
|
||||
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)
|
||||
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 ()
|
||||
|
||||
# relax pedantic flags for the tests
|
||||
# TODO: fix warnings in tests to make this redundant. (e.g. -Wshadow,...)
|
||||
|
Loading…
Reference in New Issue
Block a user