]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/CMakeLists.txt: 12560/head
authorWillem Jan Withagen <wjw@digiware.nl>
Sun, 18 Dec 2016 22:13:11 +0000 (23:13 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Sun, 18 Dec 2016 22:13:11 +0000 (23:13 +0100)
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 <wjw@digiware.nl>
src/CMakeLists.txt

index 33f7ae95487436e8206dd6f9430d5b69693e70a5..7b246bfbf89e7d75f7b921cb8380ab5a6404e9dd 100644 (file)
@@ -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)