aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-04-03 12:42:43 +0200
committerPierre Ossman <ossman@cendio.se>2024-06-24 13:46:30 +0200
commit8530a1bd034feee8bd6e3a436887af187b058f2b (patch)
tree734c1cbd2c833332ef03c36076c7ff909884300c /CMakeLists.txt
parentceb60ad3d53c8bd3d9388d231f8054851d6f6a56 (diff)
downloadtigervnc-8530a1bd034feee8bd6e3a436887af187b058f2b.tar.gz
tigervnc-8530a1bd034feee8bd6e3a436887af187b058f2b.zip
Enforce using nullptr for C++ code
The compiler can help out in making sure we are consistent in our use of nullptr rather than NULL.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b9482b1b..1cb62c11 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,6 +76,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
# Tell the compiler to be stringent
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Wvla")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat=2 -Wvla")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wzero-as-null-pointer-constant")
# Make sure we catch these issues whilst developing
IF(CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")