]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: turn libcommon into a shared library
authorKefu Chai <kchai@redhat.com>
Mon, 9 Jan 2017 15:45:07 +0000 (23:45 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 10 Jan 2017 13:10:53 +0000 (21:10 +0800)
commit8f7643792c9e6a3d1ba4a06ca7d09b0de9af1443
tree25d3f3f6c138c6935e17c5e1de833608845d7eb0
parent0bf9c6242e3c694b7f4f79a554e966385f4173b8
cmake: turn libcommon into a shared library

prior to this change, libcommon is a convenient library which gets
linked into librados, librbd and libcephfs and all ceph executables.
this incurs some problems:
 - double dose of libcommon in memory space and HDD: waste of memory
   and disk space.
 - if an application links to two libraries including libcommon at the
   same time. take librados and libcephfs as an example, they could
   interfere with each other by changing the other guy's status.
after this change, libcommon is tuned into a shared library and
renamed to libceph-common. it will be installed into $prefix/lib/ceph,
and packaged in librados2.

ceph.spec.in,debian/librados2.install: package libceph-common in
  librados2.
CMakeLists.txt:
  - do not link against libboost-* if not necessary.
  - s/common/ceph-common/g
  - install libceph-common into $prefix/lib/ceph
  - set rpath to $prefix/lib/ceph
  - link against ceph-common if an executable needs access to non public
    symbols in ceph.

Signed-off-by: Kefu Chai <kchai@redhat.com>
29 files changed:
CMakeLists.txt
ceph.spec.in
debian/librados2.install
src/CMakeLists.txt
src/client/CMakeLists.txt
src/compressor/snappy/CMakeLists.txt
src/compressor/zlib/CMakeLists.txt
src/global/CMakeLists.txt
src/java/native/CMakeLists.txt
src/json_spirit/CMakeLists.txt
src/libcephd/CMakeLists.txt
src/librados/CMakeLists.txt
src/libradosstriper/CMakeLists.txt
src/librbd/CMakeLists.txt
src/mds/CMakeLists.txt
src/rbd_fuse/CMakeLists.txt
src/rbd_replay/CMakeLists.txt
src/rgw/CMakeLists.txt
src/test/CMakeLists.txt
src/test/ObjectMap/CMakeLists.txt
src/test/common/CMakeLists.txt
src/test/erasure-code/CMakeLists.txt
src/test/libcephfs/CMakeLists.txt
src/test/librados/CMakeLists.txt
src/test/librbd/CMakeLists.txt
src/test/mds/CMakeLists.txt
src/test/messenger/CMakeLists.txt
src/test/objectstore/CMakeLists.txt
src/tools/rbd/CMakeLists.txt