diff options
author | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:50:47 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:50:47 +0100 |
commit | 123d59cd192834c70a511d4822c309de6eaff830 (patch) | |
tree | f183aa570d8d5e98312f1b60f7ef538727948262 /CMakeLists.txt | |
parent | 3620e196210a1621f98f7ba6d5a4ae3102ae2205 (diff) | |
download | tigervnc-123d59cd192834c70a511d4822c309de6eaff830.tar.gz tigervnc-123d59cd192834c70a511d4822c309de6eaff830.zip |
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c19654a..407bf67e 100644 --- a/CMakeLists.txt +++ b/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) |