Commit 6945096b by Matt Clarkson

Add -Wshadow if supported

parent e863292d
...@@ -40,6 +40,10 @@ check_cxx_compiler_flag(-Wall HAVE_FLAG_WALL) ...@@ -40,6 +40,10 @@ check_cxx_compiler_flag(-Wall HAVE_FLAG_WALL)
if (HAVE_FLAG_WALL) if (HAVE_FLAG_WALL)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif() endif()
check_cxx_compiler_flag(-Wshadow HAVE_FLAG_WSHADOW)
if (HAVE_FLAG_WSHADOW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow")
endif()
check_cxx_compiler_flag(-Werror HAVE_FLAG_WERROR) check_cxx_compiler_flag(-Werror HAVE_FLAG_WERROR)
if (HAVE_FLAG_WERROR) if (HAVE_FLAG_WERROR)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment