diff options
Diffstat (limited to 'build_settings.cmake')
-rw-r--r-- | build_settings.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/build_settings.cmake b/build_settings.cmake index 91ee4c47b81..718e0fd6323 100644 --- a/build_settings.cmake +++ b/build_settings.cmake @@ -33,6 +33,11 @@ else() set(C_WARN_OPTS "-Winline ${C_WARN_OPTS}") endif() if (VESPA_USE_SANITIZER) + if (VESPA_USE_SANITIZER STREQUAL "address" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0) + # Turn off maybe uninitialized and restrict warnings when compiling with + # address sanitizer on gcc 12 or newer. + set(C_WARN_OPTS "${C_WARN_OPTS} -Wno-maybe-uninitialized -Wno-restrict") + endif() if (VESPA_USE_SANITIZER STREQUAL "thread" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0) # Turn off warning about std::atomic_thread_fence not being supported by # address sanitizer. |