mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
cmake: Enable -Wall -Wextra
Not -Werror, just the warnings themselves. Let's just see what happens. It's warning-free on my system. Worst case we disable it again, better case we refine the set.
This commit is contained in:
parent
6617c4d79e
commit
80afda08d5
1 changed files with 5 additions and 0 deletions
|
@ -30,6 +30,11 @@ if (CMAKE_GENERATOR STREQUAL "Ninja" AND
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
|
||||
endif()
|
||||
# Enable a whole bunch of warnings, but turn off:
|
||||
# - implicit fallthrough because that does not recognize some cases where it's desired (and I *really* want this one!)
|
||||
# - comment because we use a bunch of those, and they're not really all that harmful.
|
||||
# - address, because that occurs for our mkostemp check (weak-linking requires us to compare `&mkostemp == nullptr`).
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wimplicit-fallthrough=0 -Wno-comment -Wno-address")
|
||||
|
||||
# Disable exception handling.
|
||||
ADD_COMPILE_OPTIONS(-fno-exceptions)
|
||||
|
|
Loading…
Reference in a new issue