Skip to content

Commit

Permalink
Another flag in ExtraCompilerWarnings, to get GCC to stop whining abo…
Browse files Browse the repository at this point in the history
…ut boost::optional.
  • Loading branch information
rpavlik committed Apr 25, 2016
1 parent 90d1a89 commit 1dd3d89
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions EnableExtraCompilerWarnings.cmake
Expand Up @@ -50,6 +50,15 @@ macro(_enable_extra_compiler_warnings_flags)
set(_flags "${_flags} -Wextra")
endif()

if(SUPPORTS_WALL_FLAG)
# At least GCC includes -Wmaybe-uninitialized in -Wall, which
# unneccesarily whines about boost::optional (by it's nature
# it's a "maybe" warning - prone to noisy false-positives)
check_cxx_compiler_flag(-Wno-maybe-uninitialized SUPPORTS_WNO_MAYBE_UNINITIALIZED_FLAG)
if(SUPPORTS_WNO_MAYBE_UNINITIALIZED_FLAG)
set(_flags "${_flags} -Wno-maybe-uninitialized")
endif()
endif()
endif()
endmacro()

Expand Down

0 comments on commit 1dd3d89

Please sign in to comment.