Use tracepoint definition files directly
This commit is contained in:
parent
4cfd83809a
commit
f728cd467b
5 changed files with 52 additions and 29 deletions
|
@ -19,15 +19,8 @@ if(WITH_LTTNG)
|
|||
pkg_check_modules(LTTNG REQUIRED lttng-ust)
|
||||
endif()
|
||||
if(LTTNG_FOUND)
|
||||
# Generate necessary LTTng files
|
||||
# If successful, enable tracing
|
||||
add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/tp_call.c ${PROJECT_SOURCE_DIR}/include/tp_call.h
|
||||
COMMAND lttng-gen-tp tp_call.tp -o tp_call.c -o ../include/tp_call.h
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/src/tp_call.tp
|
||||
)
|
||||
set(LTTNG_GENERATED
|
||||
include/tp_call.h
|
||||
set(LTTNG_TP_FILES
|
||||
include/tracetools/tp_call.h
|
||||
src/tp_call.c
|
||||
)
|
||||
set(TRACING_ENABLED TRUE)
|
||||
|
@ -61,7 +54,7 @@ set(SOURCES
|
|||
src/utils.cpp
|
||||
)
|
||||
if(TRACING_ENABLED)
|
||||
list(APPEND SOURCES ${LTTNG_GENERATED})
|
||||
list(APPEND SOURCES ${LTTNG_TP_FILES})
|
||||
endif()
|
||||
|
||||
add_library(${PROJECT_NAME} ${SOURCES})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue