diff --git a/CMakeLists.txt b/CMakeLists.txt index 5eeea4db5..cd4145c88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "^$")