From: Kefu Chai Date: Thu, 20 Dec 2018 04:51:37 +0000 (+0800) Subject: cmake: let rbd_api depend on librbd-tp X-Git-Tag: v14.1.0~576^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F25641%2Fhead;p=ceph.git cmake: let rbd_api depend on librbd-tp whoever includes tracing/librbd.h should depends on librbd-tp. this fix the FTBFS of: ceph/src/librbd/librbd.cc:50:10: fatal error: tracing/librbd.h: No such file or directory #include "tracing/librbd.h" ^~~~~~~~~~~~~~~~~~ compilation terminated. src/librbd/CMakeFiles/rbd_api.dir/build.make:62: recipe for target 'src/librbd/CMakeFiles/rbd_api.dir/librbd.cc.o' failed Signed-off-by: Kefu Chai --- diff --git a/src/librbd/CMakeLists.txt b/src/librbd/CMakeLists.txt index 1969abeb034..93621c4ff4e 100644 --- a/src/librbd/CMakeLists.txt +++ b/src/librbd/CMakeLists.txt @@ -139,6 +139,9 @@ add_library(rbd_internal STATIC ${librbd_internal_srcs} $) if(WITH_LTTNG) + # librbd.cc includes tracing/librbd.h + add_dependencies(rbd_api librbd-tp) + # io/AioCompletion.cc includes tracing/librbd.h add_dependencies(rbd_internal librbd-tp) endif() if(WITH_LTTNG AND WITH_EVENTTRACE) @@ -149,6 +152,9 @@ target_link_libraries(rbd_internal PRIVATE add_library(librbd ${CEPH_SHARED} librbd.cc) +if(WITH_LTTNG) + add_dependencies(librbd librbd-tp) +endif() target_link_libraries(librbd PRIVATE rbd_internal