mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-31 17:07:27 +08:00
Update CMakeLists.txt
Revert the change getting rid of the -UNDEBUG, add some unused-blah warnings. We are often using the system assert() because we include other headers that include assert.h. I noticed that assert() was being compiled out because I started getting new warnings printed about unusued variables (that were only used in the assert()s. Add these warnings to the build.
This commit is contained in:
parent
d2f47e0523
commit
d0f697be64
@ -42,14 +42,15 @@ endif()
|
||||
# Enable a whole bunch of warnings, but turn off:
|
||||
# - 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 \
|
||||
-Wno-comment \
|
||||
-Wno-address \
|
||||
")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-comment -Wno-address -Wunused-template \
|
||||
-Wunused-function -Wunused-local-typedef -Wunused-lambda-capture -Wunused-macros -Wunused-variable")
|
||||
|
||||
# Disable exception handling.
|
||||
add_compile_options(-fno-exceptions)
|
||||
|
||||
# Undefine NDEBUG to keep assert() in release builds.
|
||||
add_definitions(-UNDEBUG)
|
||||
|
||||
# Hide the CMake Rules directories in Xcode projects.
|
||||
source_group("CMake Rules" REGULAR_EXPRESSION "^$")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user