diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-03-01 07:25:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-01 07:25:13 +0100 |
commit | 0fa7bf05e6b0054bfcd80cfa44bc6aa45e53f2cd (patch) | |
tree | c93fafc0770e6a9de836c19975e0c9b51c67b7e5 | |
parent | 86056c4b8b56fbdb7797d5bd903387f3c477af4c (diff) | |
parent | 6b4a1014ee816e3740110b476283ccca3e68562e (diff) |
Merge pull request #30319 from vespa-engine/toregge/disable-maybe-uninitialized-warning-when-compiling-with-gcc-14
Disable maybe uninitialized warning when compiling with gcc 14 or newer.
-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 4e972b3839e..220593cfd8f 100644 --- a/build_settings.cmake +++ b/build_settings.cmake @@ -47,6 +47,11 @@ if (VESPA_USE_SANITIZER) set(C_WARN_OPTS "${C_WARN_OPTS} -Wno-tsan") endif() endif() +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0) + # Turn off maybe uninitialized warning when compiling with + # gcc 14 or newer. + set(C_WARN_OPTS "${C_WARN_OPTS} -Wno-maybe-uninitialized") +endif() # Warnings that are specific to C++ compilation # Note: this is not a union of C_WARN_OPTS, since CMAKE_CXX_FLAGS already includes CMAKE_C_FLAGS, which in turn includes C_WARN_OPTS transitively |