diff options
author | Kefu Chai <kchai@redhat.com> | 2019-06-12 10:50:14 +0200 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2019-06-13 13:35:26 +0200 |
commit | b3cac157f5ba062ff0bd3dcc5c9a0d8aacb175bd (patch) | |
tree | 09a5c21c59e4547606634947adf7daff1ee4acff /cmake/modules/BuildRocksDB.cmake | |
parent | cmake: set ccache for rocksdb (diff) | |
download | ceph-b3cac157f5ba062ff0bd3dcc5c9a0d8aacb175bd.tar.xz ceph-b3cac157f5ba062ff0bd3dcc5c9a0d8aacb175bd.zip |
cmake: silence GCC-9 warnings from rocksdb
GCC-9 complains:
rocksdb/db/version_edit.h:86:8: warning: implicitly-declared ‘constexpr
rocksdb::FileDescriptor::FileDescriptor(const rocksdb::FileDescriptor&)’
is deprecated [-Wdeprecated-copy]
86 | struct FileMetaData {
| ^~~~~~~~~~~~
/var/ssd/ceph/src/rocksdb/db/version_edit.h:55:19: note: because
‘rocksdb::FileDescriptor’ has user-provided ‘rocksdb::FileDescriptor&
rocksdb::FileDescriptor::operator=(const rocksdb::FileDescriptor&)’
55 | FileDescriptor& operator=(const FileDescriptor& fd) {
| ^~~~~~~~
Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'cmake/modules/BuildRocksDB.cmake')
-rw-r--r-- | cmake/modules/BuildRocksDB.cmake | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cmake/modules/BuildRocksDB.cmake b/cmake/modules/BuildRocksDB.cmake index fe55765ed96..2ee07764348 100644 --- a/cmake/modules/BuildRocksDB.cmake +++ b/cmake/modules/BuildRocksDB.cmake @@ -40,7 +40,19 @@ function(build_rocksdb) list(APPEND rocksdb_CMAKE_ARGS -G${CMAKE_GENERATOR}) CHECK_C_COMPILER_FLAG("-Wno-stringop-truncation" HAS_WARNING_STRINGOP_TRUNCATION) if(HAS_WARNING_STRINGOP_TRUNCATION) - list(APPEND rocksdb_CMAKE_ARGS -DCMAKE_C_FLAGS="-Wno-stringop-truncation") + list(APPEND rocksdb_CMAKE_ARGS -DCMAKE_C_FLAGS=-Wno-stringop-truncation) + endif() + include(CheckCXXCompilerFlag) + check_cxx_compiler_flag("-Wno-deprecated-copy" HAS_WARNING_DEPRECATED_COPY) + if(HAS_WARNING_DEPRECATED_COPY) + set(rocksdb_CXX_FLAGS -Wno-deprecated-copy) + endif() + check_cxx_compiler_flag("-Wno-pessimizing-move" HAS_WARNING_PESSIMIZING_MOVE) + if(HAS_WARNING_PESSIMIZING_MOVE) + set(rocksdb_CXX_FLAGS "${rocksdb_CXX_FLAGS} -Wno-pessimizing-move") + endif() + if(rocksdb_CXX_FLAGS) + list(APPEND rocksdb_CMAKE_ARGS -DCMAKE_CXX_FLAGS='${rocksdb_CXX_FLAGS}') 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. |