Browse Source

Enable more warnings by default

These are also useful warnings that tend to find real bugs, so let's
enable then.

The downside is they require us to mark certain things so the compiler
knows if they were on purpose or not.
pull/1574/head
Pierre Ossman 1 year ago
parent
commit
ebfd56106d
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      CMakeLists.txt

+ 2
- 2
CMakeLists.txt View File

@@ -73,8 +73,8 @@ ENDIF()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")

# Tell the compiler to be stringent
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat=2 -Wvla")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wformat=2 -Wvla")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Wvla")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat=2 -Wvla")
# Make sure we catch these issues whilst developing
IF(CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")

Loading…
Cancel
Save