瀏覽代碼

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 年之前
父節點
當前提交
ebfd56106d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      CMakeLists.txt

+ 2
- 2
CMakeLists.txt 查看文件

@@ -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…
取消
儲存