Commit 974e5c6a authored by Nick Cameron's avatar Nick Cameron Committed by yiwu-arbug

Relax warnings as errors so we can build on Clang 11 (#90)

This prevents TiKV building on MacOS. See also https://github.com/pingcap/rocksdb/pull/123Signed-off-by: 's avatarNick Cameron <nrc@ncameron.org>
parent 8c84a1a4
......@@ -143,8 +143,13 @@ option(FAIL_ON_WARNINGS "Treat compile warnings as errors" ON)
if(FAIL_ON_WARNINGS)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
else() # assume GCC
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=shadow -Wno-error=defaulted-function-deleted")
endif()
endif()
endif()
endif()
......
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