[Piglit] [PATCH 1/1] cmake: change VLA warning into error
Jan Vesely
jan.vesely at rutgers.edu
Fri Feb 20 07:17:20 PST 2015
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 420f76f..db5f718 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -210,9 +210,9 @@ if (NOT MSVC)
ENDIF (CXX_COMPILER_FLAG_WALL)
# MSVC does not support C99 variable length arrays
- CHECK_C_COMPILER_FLAG("-Wvla" C_COMPILER_FLAG_WVLA)
- IF (C_COMPILER_FLAG_WVLA)
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wvla")
+ CHECK_C_COMPILER_FLAG("-Werror=vla" C_COMPILER_FLAG_WEVLA)
+ IF (C_COMPILER_FLAG_WEVLA)
+ SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=vla")
ENDIF ()
# MSVC only supports C99 variadic macros. It doesn't support the
# non-standard GNU named variadic macro syntax that's documented in
--
2.1.0
More information about the Piglit
mailing list