Skip to content

Commit

Permalink
Relax warnings as errors so we can build on Clang 11 (#90)
Browse files Browse the repository at this point in the history
This prevents TiKV building on MacOS. See also tikv/rocksdb#123

Signed-off-by: Nick Cameron <nrc@ncameron.org>
  • Loading branch information
nrc authored and yiwu-arbug committed Sep 26, 2019
1 parent 8c84a1a commit 974e5c6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmake/rocksdb_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 974e5c6

Please sign in to comment.