made warning flag optional
This commit is contained in:
parent
8ef6283bf4
commit
1ac2479b28
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user