]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: revamp on lttng support
authorKefu Chai <kchai@redhat.com>
Thu, 26 May 2016 06:32:48 +0000 (14:32 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 27 May 2016 11:54:42 +0000 (19:54 +0800)
commita2706c7e167eba1b262c7c61826e9be5a04d9192
tree70eb3b2ee8874c989ddeeece8dfa09bc33f163b5
parent943d71ce925c879fcbf8ca5491fab44805e996e3
cmake: revamp on lttng support

* Findlttng-ust.cmake: detect lttng-gen-tp, and make it a required var
* Findlttng-ust.cmake: fix the detection of lttng
* src/tracing/CMakeLists.txt:
  - do not put the generated header files into ${CMAKE_SOURCE_DIR}/src/tracing,
    instead we should put the generated files into ${PROJECT_BINARY_DIR}/include.
  - do not compile the tracing library using the .c files in the repo,
    instead, we should generate them at compile time using lttng-gen-tp,
    and compile the genererated .c files.
* CMakeLists.txt: make the lttng-use package REQUIRED if WITH_LTTNG=ON
* src/CMakeLists.txt: let librados depend on librados-tp if LTTNG is
  enabled: librados includes tracing/librados.h. the same applies to
  librbd, libos and libosd. cmake could deduce the dependencies if we
  add the lttng header files under include/tracing into the
  corresponding target, as the lttng header files are already listed
  as OUTPUT and GENERATED files, but this requires us to put all the
  involved targets in the same CMakeLists.txt. in this case, three
  CMakeLists.txts are impacted. so we create a new target for each
  lttng header, and let the impacted target depend on it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
CMakeLists.txt
cmake/modules/Findlttng-ust.cmake
src/CMakeLists.txt
src/librbd/CMakeLists.txt
src/tracing/CMakeLists.txt