diff --git a/CMakeLists.txt b/CMakeLists.txt index 71a1ea209..11c28801c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,10 @@ if(ADDRESS_SANITIZER) add_compile_options($,$>,-fsanitize=address,>) endif() +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + add_compile_options(-fno-delete-null-pointer-checks) +endif() + # whether we are using MSBuild as a generator set(usingMsBuild $)