diff options
author | Tor Egge <Tor.Egge@online.no> | 2024-02-18 22:40:01 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2024-02-18 22:40:01 +0100 |
commit | 6b4a1014ee816e3740110b476283ccca3e68562e (patch) | |
tree | d0aad6de5aeb76e9e30a01cf062b4a6a8eae4b4b | |
parent | 24a70ad90fa6005ab6d466bb87081d6ad36f6780 (diff) |
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 |