diff options
-rw-r--r-- | CMakeLists.txt | 8 |
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") |