mirror of https://github.com/google/benchmark.git
Add -Wshadow if supported
This commit is contained in:
parent
e863292dcc
commit
6945096ba1
|
@ -40,6 +40,10 @@ check_cxx_compiler_flag(-Wall HAVE_FLAG_WALL)
|
|||
if (HAVE_FLAG_WALL)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
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)
|
||||
if (HAVE_FLAG_WERROR)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
||||
|
|
Loading…
Reference in New Issue