aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2023-01-04 16:11:21 +0100
committerPierre Ossman <ossman@cendio.se>2023-01-04 17:04:36 +0100
commitff25168a531bf9e0dd0d3ba96ad9c2966c64e944 (patch)
treeb926570ba6069a51420dcd246bfaeb4210deccaa /CMakeLists.txt
parente0d2843c60246c73be727b3ed7ab89ea10beb0a3 (diff)
downloadtigervnc-ff25168a531bf9e0dd0d3ba96ad9c2966c64e944.tar.gz
tigervnc-ff25168a531bf9e0dd0d3ba96ad9c2966c64e944.zip
Always enable -Wvla
It's only the -Werror part we want to be conditional on being debug builds.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 70ccdbba..486c64ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,12 +73,12 @@ 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")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wformat=2")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat=2 -Wvla")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -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 -Werror=vla")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Werror=vla")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
ENDIF()
# clang doesn't support format_arg, which breaks this warning
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")