summaryrefslogtreecommitdiffstats
path: root/debian/patches/progress-linux/0002-rocksdb-cxxflags-2.patch
blob: 564c429eddcd5d10e45e577e669ee3d05b9b02c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Author: Kefu Chai <tchaikov@gmail.com>
Description: cmake/modules/BuildRocksDB.cmake: inherit parent's CMAKE_CXX_FLAGS
 CMake allows us to customize `CMAKE_CXX_FLAGS` by setting CXXFLAGS
 environmental variable. and Debian's debhelper also sets CXXFLAGS
 when it builds cmake projects for customizing the building flags.
 .
 but we fail to populate this setting down when building external
 projects. this is important when it comes to the projects which
 is critical to the performance. RocksDB is one of them.
 .
 in this change, we pass the `CMAKE_CXX_FLAGS` down in
 `BuildRocksDB.cmake` so that its `CMAKE_CXX_FLAGS` contains
 the same set of `CMAKE_CXX_FLAGS` used by its parent project.
 .
 this should help with the performance in the bluestore, where
 RocksDB is used.
 .
 https://lists.ceph.io/hyperkitty/list/ceph-users@ceph.io/thread/W5QEP4PM6G6L62W5PNJMGXU4Y26437XL/

diff -Naurp ceph.orig/cmake/modules/BuildRocksDB.cmake ceph/cmake/modules/BuildRocksDB.cmake
--- ceph.orig/cmake/modules/BuildRocksDB.cmake
+++ ceph/cmake/modules/BuildRocksDB.cmake
@@ -56,6 +56,7 @@ function(build_rocksdb)
   endif()
   include(CheckCXXCompilerFlag)
   check_cxx_compiler_flag("-Wno-deprecated-copy" HAS_WARNING_DEPRECATED_COPY)
+  set(rocksdb_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
   if(HAS_WARNING_DEPRECATED_COPY)
     string(APPEND rocksdb_CXX_FLAGS " -Wno-deprecated-copy")
   endif()