mirror of
https://github.com/google/benchmark.git
synced 2025-02-05 08:40:17 +08:00
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)
|
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")
|
||||||
|
Loading…
Reference in New Issue
Block a user