From ccd7ebb5b63e577eadb41cc41c08df2163cc0ddc Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Sun, 18 Dec 2016 23:13:11 +0100 Subject: [PATCH] src/CMakeLists.txt: The Rocksdb code under Clang complains about: /home/jenkins/workspace/ceph-master/src/rocksdb/util/thread_local.h:205:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined] ^ /home/jenkins/workspace/ceph-master/src/rocksdb/util/thread_local.h:22:4: note: expanded from macro 'ROCKSDB_SUPPORT_THREAD_LOCAL' !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(IOS_CROSS_COMPILE) ^` So under Clang disable -Werror Signed-off-by: Willem Jan Withagen --- src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 33f7ae954874..7b246bfbf89e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -700,6 +700,10 @@ endif(WITH_CCACHE AND CCACHE_FOUND) list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_AR=${CMAKE_AR}) list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) +if (CMAKE_CXX_COMPILER_ID STREQUAL Clang) + list(APPEND ROCKSDB_CMAKE_ARGS -DFAIL_ON_WARNINGS=OFF) +endif() + # we use an external project and copy the sources to bin directory to ensure # that object files are built outside of the source tree. include(ExternalProject) -- 2.47.3