]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake: rgw: do not link against boost in a wholesale 15347/head
authorKefu Chai <kchai@redhat.com>
Mon, 29 May 2017 06:28:51 +0000 (14:28 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 3 Jun 2017 09:25:20 +0000 (17:25 +0800)
commitba1ca1ce173234adb61335f6322b390ba483d0ff
tree564a4bfae1582165bd3d84610bc50a0e7e506d32
parentea911b7f480ba0eb6cda15e9ea8d964a359a8916
cmake: rgw: do not link against boost in a wholesale

With the new Beast frontend, RGW now has a small Boost dependency [1] which was
being addressed by statically (and unconditionally) linking *all* the Boost
libraries. This patch ensures that only the necessary Boost components are
linked.

We use the target_link_libraries(<target> <item>...) [2] syntax to ensure that the
library dependencies are transitive: i.e. "when this target is linked into
another target then the libraries linked to this target will appear on the link
line for the other target too."

[1] The boost/asio/spawn.hpp header used by rgw_asio_frontend.cc depends on
    boost::coroutine/boost::context

[2] https://cmake.org/cmake/help/v3.3/command/target_link_libraries.html#libraries-for-both-a-target-and-its-dependents

Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/rgw/CMakeLists.txt