浏览代码

Make warnings into errors when doing debug builds

Assume debug builds means it's a developer working on TigerVNC
rather than a user just compiling it. At that point we should not
accept any new warnings in the code.
tags/v1.4.90
Pierre Ossman 9 年前
父节点
当前提交
123d59cd19
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
    0
      CMakeLists.txt

+ 8
- 0
CMakeLists.txt 查看文件

@@ -70,6 +70,14 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -UNDEBUG")
# Tell the compiler to be stringent
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat=2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wformat=2")
# Make sure we catch these issues whilst developing
IF(CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
# We have a lot of old GnuTLS crud we need to ignore for now
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=deprecated-declarations")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-declarations")
ENDIF()

if(NOT DEFINED BUILD_WINVNC)
set(BUILD_WINVNC 1)

正在加载...
取消
保存