Skip to content

Commit

Permalink
CMake: disable -Wmaybe-uninitialized for GCC builds
Browse files Browse the repository at this point in the history
This is very noisy with lots of false positives, especially
in newer version of GCC. So for now disable this.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
  • Loading branch information
flichtenheld authored and dsommers committed Aug 2, 2023
1 parent bb61350 commit d7e8375
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/findcoredeps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ function(add_core_dependencies target)
# target_compile_options(${target} PRIVATE /W4)
else()
target_compile_options(${target} PRIVATE -Wall -Wsign-compare)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# disable noisy warnings
target_compile_options(${target} PRIVATE -Wno-maybe-uninitialized)
endif()
endif()

endfunction()
Expand Down

0 comments on commit d7e8375

Please sign in to comment.