forked from github/server
gcc flag to prevent use of VLA
This commit is contained in:
parent
253849416a
commit
bf9c50cfc5
1 changed files with 2 additions and 2 deletions
|
@ -21,11 +21,11 @@ COMPILE_DEFINITIONS ERESSEA_BUILDNO="${ERESSEA_BUILDNO}")
|
|||
ENDIF()
|
||||
|
||||
IF (CMAKE_COMPILER_IS_GNUCC)
|
||||
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unused-but-set-variable")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wvla")
|
||||
ENDIF()
|
||||
IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wno-sign-conversion")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wsign-compare -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wsign-compare -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
|
||||
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c89")
|
||||
ELSEIF(MSVC)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /WX /MP /D_CRT_SECURE_NO_WARNINGS /D_USE_MATH_DEFINES")
|
||||
|
|
Loading…
Reference in a new issue