[Piglit] [PATCH 1/1] cmake: change VLA warning into error

Jose Fonseca jfonseca at vmware.com
Fri Feb 20 07:24:34 PST 2015


On 20/02/15 15:17, Jan Vesely wrote:
> 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
>

Thanks.

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>


More information about the Piglit mailing list