Skip to content

Commit b207c56

Browse files
committed
COMP: Enable -Wshadow warnings for GCC and clang
Suggested by Bradley Lowekamp at SimpleITK/SimpleITK#2104 (comment) Aims to reproduce those warnings from SimpleITK/monarch-i-06c02d82ab38530ea-Linux at https://open.cdash.org/viewBuildError.php?type=1&buildid=9568906
1 parent 1edd7cd commit b207c56

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ include(elastixExportTarget)
8181

8282
if (MSVC)
8383
add_compile_options(/W3)
84+
else()
85+
add_compile_options(
86+
-Wshadow
87+
)
8488
endif()
8589

8690
#---------------------------------------------------------------------

0 commit comments

Comments
 (0)