Commit Graph

207 Commits

Author SHA1 Message Date
Sage Weil
c63be04dee Merge PR #22949 into master
* refs/pull/22949/head:
	cmake: cleanup FindCython.cmake

Reviewed-by: Nathan Cutler <ncutler@suse.com>
2018-07-10 08:42:22 -05:00
Kefu Chai
94453fc137
Merge pull request #22931 from tchaikov/wip-find-py-interp-for-gtest-parallel
cmake: find a python2 interpreter for gtest-parallel

Reviewed-by: Erwan Velu <erwan@redhat.com>
2018-07-10 21:29:54 +08:00
Kefu Chai
423ca5764e cmake: find python2 interpreter for gtest-parallel
gtest-parallel only supports python2 at this moment, so find it
a python2 interpreter if it is enabled.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-09 21:09:18 +08:00
Kefu Chai
9888cac80e cmake: cleanup FindCython.cmake
print out error message if cython module is not found.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-09 17:13:56 +08:00
Kefu Chai
34f1ee7897 cmake: remove workarounds for supporting cmake 2.x
and bump up the required cmake version to 3.5.1

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-07 01:24:02 +08:00
Kefu Chai
63656af5f2 cmake: extract the RDMA libraries interface properties out
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-28 23:26:28 +08:00
Kefu Chai
ea85753c9a cmake: remove stale comments
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-28 13:21:02 +08:00
Kefu Chai
572a740a03
Merge pull request #20297 from tanghaodong25/rdma-cm
msg/async/rdma: add iWARP RDMA protocol support

Reviewed-by: Haomai Wang <haomai@xsky.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-06-27 20:37:48 +08:00
Kefu Chai
c9fb0484d6
Merge pull request #22591 from tchaikov/wip-gcc-8.1
cmake: disable -Werror-stringop-truncation for rocksdb

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2018-06-26 12:41:57 +08:00
haodong
f54e42f3a3 msg/async/rdma: cmake find_package for librdmacm
Signed-off-by: Haodong Tang <haodong.tang@intel.com>
2018-06-20 14:08:26 +08:00
haodong tang
a240aef143 msg/async/rdma: add RDMA iWARP protocol support
Signed-off-by: Haodong Tang <haodong.tang@intel.com>
2018-06-20 14:08:20 +08:00
Kefu Chai
265b6d179d cmake: disable -Werror-stringop-truncation for rocksdb
this option was introduced in GCC-8.1, and is enabled by default.
otherwise we will have:

src/rocksdb/util/status.cc:28:15: error: ‘char* strncpy(char*, const
char*, size_t)’ output truncated before terminating nul copying as many
bytes from a string as its length [-Werror=string
op-truncation]
   std::strncpy(result, state, cch - 1);
   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/var/ssd/ceph/src/rocksdb/util/status.cc:19:18: note: length computed
here
       std::strlen(state) + 1; // +1 for the null terminator
       ~~~~~~~~~~~^~~~~~~
cc1plus: all warnings being treated as errors

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-18 14:18:47 +08:00
Kefu Chai
4c0a2b9373 cmake: add WITH_GTEST_PARALLEL option
and remove src/test/gtest-parallel submodule, because gtest-parallel is
only useful for running tests. and not all end-users are interested in
running test not to mention running them in parallel. so, to avoid
including gtest-parallel scripts in the dist tarball. it'd be better to
make it optional, and an external project.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-15 15:55:15 +02:00
Erwan Velu
13bc625b5f src/test: Using gtest-parallel to speedup unittests
Unittests are run sequentially and could take a long while to run.

This commit is about using gtest-parallel on some of them which are
known to be very slow due to this sequentiality.

To enable the parallel features, the 'parallel' argument just have to be
added to the add_ceph_unittest() call like in :
    -add_ceph_unittest(unittest_throttle)
    +add_ceph_unittest(unittest_throttle parallel)

This commit impact the following tests :

Test name                          Before   After (in seconds)
unittest_erasure_code_shec_all:       212      43
unittest_throttle                      15       5
unittest_crush                          9       6
unittest_rbd_mirror                    79      21

Total                                 315      75

This commit saves 240 seconds (4 minutes) per build.

Note it exist several other long tests but can't be parallelized since
there is explicit dependencies in the order to run the subtests.
Those stay sequential.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2018-06-15 15:53:30 +02:00
Kefu Chai
c2026b7473 cmake: update BuildSPDK for spdk-18.05
in spdk v18.05, libuuid is linked by libspdk_util.a, in which,
it is used by lib/util/uuid.c. and libspdk_vol.a uses the wrapper
function exposed by libspdk_util.a, so update the CMakefile script to
reflect the change.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-14 09:34:01 +08:00
Willem Jan Withagen
0c63f42219 cmake: cmake: oath lives in liboath
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2018-06-10 16:21:41 +02:00
Kefu Chai
89ed08569b
Merge pull request #22439 from shaba/devel/fix-rocksdb
cmake: fix find system rockdb

Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-06-08 21:22:45 +08:00
Alexey Shabalin
2ac26bd0e0 cmake: fix find system rockdb
- fix path for version.h
- fix typo ROCKDB -> ROCKSDB

Signed-off-by: Alexey Shabalin <shaba@altlinux.org>
2018-06-07 14:19:41 +03:00
Kefu Chai
ca78ab2254 cmake: find liboath using the correct name
we should reference liboath by the $name in Find${name}.cmake, also the
$name should be consistent when calling find_package_handle_standard_args().
in this change
* rename Findliboath.cmake to FindOATH.cmake to be consistent with other
  find_package() moduless.
* use "OATH" in find_package_handle_standard_args() instead of "oath"
* set the interface properties for OATH::OATH, so the target linking
  against it can reference its header directories and libraries automatically.
* remove the stale comment for find_package_handle_standard_args()
* set OATH_INCLUDE_DIRS and OATH_LIBRARIES to follow the convention of
  find_package(), even they are not used directly in this project.

Reported-by: Erwan Velu <erwan@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-06 22:49:35 +08:00
Igor Fedotov
83841bf3de build/cmake: enable RTTI for both debug and release RocksDB builds.
Overwise ceph build in Release mode is failing.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
2018-05-28 23:00:42 +03:00
Kefu Chai
2d351c2893
Merge pull request #22019 from majianpeng/cmake-fio
cmake: update fio version from 3.5 to 540e235dcd276e63c57.

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
2018-05-27 19:37:59 +08:00
Kefu Chai
77b35faa36
Merge pull request #22204 from tchaikov/wip-cmake-silence-bjam
cmake: always turn off bjam debugging output

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2018-05-25 22:25:22 +08:00
Kefu Chai
3766cdff1f cmake: always turn off bjam debugging output
we have 'DH_VERBOSE=1' in debian/rules, which instructs debhelper to
pass -DCMAKE_VERBOSE_MAKEFILE=ON to cmake. but the verbose output for
building boost does not really help if something goes wrong while
building the deb packages. if we do want to enable the verbose output,
we can always enable it by passing `-d <N>' to it. see
https://boostorg.github.io/build/manual/develop/index.html#bbv2.overview.invocation.options
.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-05-24 16:06:09 +08:00
Kefu Chai
71462ddf05 cmake/modules/BuildRocksDB.cmake: enable compressions for rocksdb
we should enable them if they are found.

currently, we don't have bzip2 compressor plugin, so it's not detected
in the cmake script. we can always enable it for rocksdb in future.

Fixes: http://tracker.ceph.com/issues/24025
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-05-23 23:59:41 +08:00
Kefu Chai
4d646ef579 cmake: do not check for aligned_alloc() anymore
this reverts 16f0a67d

Fixes: http://tracker.ceph.com/issues/23653
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-05-17 10:33:04 +08:00
Jianpeng Ma
56ce1b793c cmake: update fio version from 3.5 to 540e235dcd276e63c57.
Fio commit(d04f1d5b342e7733) make external ioengine work.
This need when build libfio_ceph_objectstore.so.

Meanwhile fix a comiler error:
/home/ceph/src/test/fio/fio_ceph_objectstore.cc: In constructor ‘{anonymous}::ceph_ioengine::ceph_ioengine()’:
/home/ceph/src/test/fio/fio_ceph_objectstore.cc:733:19: error: invalid conversion from ‘int (*)(thread_data*, io_u*)’ to ‘fio_q_status (*)(thread_data*, io_u*)’ [-fpermissive]
     queue       = fio_ceph_os_queue;
                   ^~~~~~~~~~~~~~~~~
src/test/fio/CMakeFiles/fio_ceph_objectstore.dir/build.make:62: recipe for target 'src/test/fio/CMakeFiles/fio_ceph_objectstore.dir/fio_ceph_objectstore.cc.o' failed

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2018-05-16 17:56:20 +08:00
Dan Mick
39b2626c7a Remove embedded 'cephd' code
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2018-05-11 13:10:26 -07:00
Kefu Chai
19230378c8 cmake: specify missing settings for dpdk
* after upgrading to gcc-8, seems dpdk requires more settings to compile.
  in which, CONFIG_RTE_MAX_VFIO_GROUPS=64 is copied from config/common_base.
* librte_bus_pci.a depends on librte_pci.a, so reorder the libraries
  in DPDK_LIBRARIES.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-05-06 15:26:14 +08:00
Kefu Chai
50a052d79e
Merge pull request #19714 from qwren/qatzip-compressor
compressor: add QAT support

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-05-04 09:17:17 +08:00
Kefu Chai
791af5459e cmake: enable CMP0051
the new behavior of get_target_property(<var> <target> SOURCES) will be
enforced in future versions of cmake, so let ready for this change now
by removing the generator expressions from the returned source file
list.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-26 16:47:54 +08:00
Kefu Chai
4aea3bed7f cmake: enable CMP0046
so cmake will error on "non-existent dependency in add_dependencies", we
add dependency on CONFIGURE_FILE() output, which is wrong, as its output
is not a target, and is generated when cmake runs. so remove them from
dependencies.

regarding to ceph_ver.h, its path is also wrong. it is created under
${CMAKE_BINARY_DIR}/src/include. so this is another reason to remove it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-26 16:44:09 +08:00
Kefu Chai
53a1500a8f cmake,make-dist: bump up boost version to 1.67
* to pick up the fix of https://svn.boost.org/trac10/ticket/11622
* also the boost::python's library name now includes the version suffix
  of python version, so update BuildBoost.cmake accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-21 09:02:28 +08:00
Kefu Chai
112f79f8de cmake: s/boost_256/boost_sha256/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-21 01:33:24 +08:00
Kefu Chai
3178bb9638 cmake: disable gflags support in rocksdb
to silence the warnings like

CMake Warning at CMakeLists.txt:73 (find_package):
  By not providing "Findgflags.cmake" in CMAKE_MODULE_PATH this project
has
  asked CMake to find a package configuration file provided by "gflags",
but
  CMake did not find one.

  Could not find a package configuration file provided by "gflags" with
any
  of the following names:

    gflagsConfig.cmake
    gflags-config.cmake

  Add the installation prefix of "gflags" to CMAKE_PREFIX_PATH or set
  "gflags_DIR" to a directory containing one of the above files.  If
"gflags"
  provides a separate development package or SDK, be sure it has been
  installed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-21 01:17:37 +08:00
Kefu Chai
19aee456c0 cmake,make-dist: use sha256 instead of md5 for checksum
the boost's download page offers the SHA256 hash, so it'd be easier to
verify the hash this way.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-21 01:17:35 +08:00
Qiaowei Ren
9f3965aef3 compressor: add QAT support
This patch adds new QATzip plugin to support QAT for compression.

QATZip is a user space library which builds on top of the Intel
QAT (QuickAssist Technology) user space library, to provide extended
accelerated compression and decompression services by offloading the
actual compression and decompression request(s) to the hardware
QAT accelerators, which are more efficient in terms of cost and power
than general purpose CPUs for those specific compute-intensive
workloads.

Based on QAT accelerators, QATZip can support several compression
algorithm, including deflate, snappy, lz4, etc..

Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com>
2018-04-18 12:05:44 +08:00
Kefu Chai
faa84ab975 cmake: expose Boost_VERSION
to appease the consumers of FindBoost.cmake, they are expecting this
variable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-13 12:19:36 +08:00
Kefu Chai
a15d3d39a7 cmake: rename the boost header target to Boost::boost
because FindBoost.cmake defines Boost::boost as the target for header
only dependencies.

due to the limit of cmake < 3.1, this only applies to cmake > 3.1

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-04-13 12:19:36 +08:00
Yehuda Sadeh
c3a6f7588a rgw: mfa - initial work
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2018-04-09 07:01:02 -07:00
Kefu Chai
c454b1d1d6
Merge pull request #20535 from ifed01/wip-ifed-bring-fio
test/fio: enable objectstore FIO plugin building without the need to install and build FIO source code

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-03-06 08:36:39 +08:00
Igor Fedotov
939805165e test/fio: enable objectstore FIO plugin building without the need to install and build FIO source code
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
2018-03-05 20:35:08 +03:00
Kefu Chai
9535165149 cmake: add implicit dependencies between boost libs
so the dependencies can be included when linking against the one which
depends on them. for example, libboost_filesystem depends on
libboost_system, if we don't link against the latter, linker will bail
out when linking an executable using Boost::filesystem.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-02-27 21:26:42 +08:00
Kefu Chai
854ca24b19 cmake: add an alias for unit_test_framework
should pass --with-test for building Boost::unit_test_framework

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-02-27 21:26:42 +08:00
Casey Bodley
a467e5b1cf cmake: skip boost dependency on ALIAS targets
the boost override for add_library() does not work for ALIAS targets:

CMake Error at cmake/modules/BuildBoost.cmake:227 (add_dependencies):
  Cannot add target-level dependencies to alias target "Seastar::seastar".

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2018-02-27 21:26:42 +08:00
Kefu Chai
d051bf0441 cmake: disable DOWNLOAD_NO_PROGRESS if cmake ver is lower than 3.1
see https://cmake.org/cmake/help/v3.1/module/ExternalProject.html and
https://cmake.org/cmake/help/v3.0/module/ExternalProject.html. the
former has DOWNLOAD_NO_PROGRESS, while the latter does not.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-02-20 06:40:15 +08:00
Kefu Chai
2277a10279 cmake: fix the include dir for building boost::python
the "includes" directories are separated by spaces not semicolons.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-02-06 00:36:26 +08:00
Kefu Chai
6f725e76d5 cmake: build Boost.python with specified version of python
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-01-25 22:26:10 +08:00
Casey Bodley
ba85740955 cmake: remove cryptopp option
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2018-01-19 10:25:41 -05:00
Sage Weil
755ea1c054
Merge pull request #19914 from tchaikov/wip-cmake-check-boost-in-src
cmake: check version of boost in src/boost

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2018-01-13 09:56:08 -06:00
Kefu Chai
fd5a522928 cmake: check version of boost in src/boost
after bumping up the required boost version, old copy of boost in
src/boost will not work. so we need to error out early.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-01-11 13:19:15 +08:00