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 be254e7 commit 66c86b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
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 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
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 66c86b1

Please sign in to comment.