made warning flag optional

This commit is contained in:
Robin Müller 2020-12-29 18:06:25 +01:00
parent 8ef6283bf4
commit 1ac2479b28

View File

@ -110,11 +110,18 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(WARNING_FLAGS set(WARNING_FLAGS
-Wall -Wall
-Wextra -Wextra
-Wshadow=local
-Wimplicit-fallthrough=1 -Wimplicit-fallthrough=1
-Wno-unused-parameter -Wno-unused-parameter
-Wno-psabi -Wno-psabi
) )
if(NOT DEFINED WARNING_SHADOW_LOCAL)
option(WARNING_SHADOW_LOCAL "Show shadows declarations warning." ON)
endif()
if(WARNING_SHADOW_LOCAL)
list(APPEND WARNING_FLAGS "-Wshadow=local")
endif()
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")