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

View file

@ -12,10 +12,8 @@ endif()
find_package(ament_cmake REQUIRED) find_package(ament_cmake REQUIRED)
option(WITH_LTTNG "Enable support for tracing with LTTng" ON) option(TRACETOOLS_DISABLED "Explicitly disable support for tracing with LTTng" OFF)
if(WITH_LTTNG) if(NOT TRACETOOLS_DISABLED)
# Set TRACING_ENABLED if we can find lttng-ust
# TODO should these be quiet?
find_package(PkgConfig) find_package(PkgConfig)
if(PkgConfig_FOUND) if(PkgConfig_FOUND)
pkg_check_modules(LTTNG lttng-ust) pkg_check_modules(LTTNG lttng-ust)