]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: compile crimson-specific libraries 23957/head
authorKefu Chai <kchai@redhat.com>
Thu, 6 Sep 2018 09:46:55 +0000 (17:46 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 6 Sep 2018 15:29:52 +0000 (23:29 +0800)
commit6fdc2c13de24e1c4d7fdb4efb666c43004d2861e
tree2bd21044000661f8500da180ff941a247b3c6d33
parent4488b504d6c7911645f3381b17ef67b720168983
cmake: compile crimson-specific libraries

- add crimson::cflags target for populating WITH_SEASTAR=1 macro
  so any library linking against crimson::cflags will have WITH_SEASTAR=1
  defined. but we still need to set the definition and include
  directories for object targets.
- there are two ways to use the seastar logging backend, to specify the
  backend at run-time, or to do so at compile-time. if we do so
  at run-time, we would need to include seastar specific headers in
  dout.h. this will force the non-seastar-osd components to pull in
  seastar header file or linkage dependencies. and it's not performant,
  as we need to check the option everytime we are about the print a log
  message as the ceph::common::ConfigProxy for seastar is not compatible
  ::ConfigProxy at binary level -- they don't inherit from the same
  parent class, and ceph_context does not keep a reference of this
  nonexistent parent class.
    if we respect WITH_SEASTAR preprocessor macro, the only downside is
  that we need to re-compile all compilation units using logging with
  WITH_SEASTAR=1. and this implies a side effect, we don't need to use
  template techniques to specialize for seastar anymore, we can just
  conditionalize the seastar/alien specific behavior on
  `#ifdef WITH_SEASTAR`.
    so in this change, we compile crimson-common and crimson-auth as the
  alternatives of ceph-common and common-auth-objs respectively. and
  WITH_SEASTAR=1 is defined when compiling them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt
src/auth/CMakeLists.txt
src/crimson/CMakeLists.txt
src/crush/CMakeLists.txt