Skip to content

Commit

Permalink
[build] Add -Wshadow=local to CMake build flags.
Browse files Browse the repository at this point in the history
Supported since GCC 7.0.
  • Loading branch information
maxsharabayko committed Apr 25, 2023
1 parent c47596a commit fb0715d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,9 @@ endif()
# add extra warning flags for gccish compilers
if (HAVE_COMPILER_GNU_COMPAT)
set (SRT_GCC_WARN "-Wall -Wextra")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
set (SRT_GCC_WARN "${SRT_GCC_WARN} -Wshadow=local")
endif()
else()
# cpp debugging on Windows :D
#set (SRT_GCC_WARN "/showIncludes")
Expand Down

0 comments on commit fb0715d

Please sign in to comment.