Rename option

This commit is contained in:
Christophe Bedard 2019-07-25 09:03:29 +02:00
parent ae093f062d
commit 32717cb806
2 changed files with 7 additions and 10 deletions

View file

@ -12,15 +12,14 @@ endif()
find_package(ament_cmake_ros REQUIRED)
option(WITH_LTTNG "Enable support for tracing with LTTng" ON)
if(WITH_LTTNG)
# Set TRACING_ENABLED if we can find lttng-ust
# TODO: Should these be quiet?
option(TRACETOOLS_DISABLED "Explicitly disable support for tracing with LTTng" OFF)
if(NOT TRACETOOLS_DISABLED)
find_package(PkgConfig)
if(PkgConfig_FOUND)
pkg_check_modules(LTTNG lttng-ust)
if(LTTNG_FOUND)
set(TRACING_ENABLED TRUE)
message("LTTng found: tracing enabled")
endif()
endif()
endif()
@ -52,8 +51,8 @@ set(SOURCES
if(TRACING_ENABLED)
list(APPEND SOURCES
include/tracetools/tp_call.h
src/tp_call.c)
src/tp_call.c
)
endif()
add_library(${PROJECT_NAME} SHARED ${SOURCES})