Use TRACETOOLS_LTTNG_ENABLED instead of WITH_LTTNG in the code
This commit is contained in:
parent
8f7d5e99eb
commit
a85d4ade5d
3 changed files with 5 additions and 5 deletions
|
@ -59,7 +59,7 @@ endif()
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} ${SOURCES})
|
add_library(${PROJECT_NAME} ${SOURCES})
|
||||||
if(TRACING_ENABLED)
|
if(TRACING_ENABLED)
|
||||||
target_compile_definitions(${PROJECT_NAME} PUBLIC WITH_LTTNG)
|
target_compile_definitions(${PROJECT_NAME} PUBLIC TRACETOOLS_LTTNG_ENABLED)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LTTNG_LIBRARIES} -ldl)
|
target_link_libraries(${PROJECT_NAME} ${LTTNG_LIBRARIES} -ldl)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(${PROJECT_NAME})
|
target_link_libraries(${PROJECT_NAME})
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "tracetools/tracetools.h"
|
#include "tracetools/tracetools.h"
|
||||||
|
|
||||||
#if defined(WITH_LTTNG) && !defined(_WIN32)
|
#if defined(TRACETOOLS_LTTNG_ENABLED) && !defined(_WIN32)
|
||||||
# include "tracetools/tp_call.h"
|
# include "tracetools/tp_call.h"
|
||||||
# define CONDITIONAL_TP(...) \
|
# define CONDITIONAL_TP(...) \
|
||||||
tracepoint(__VA_ARGS__)
|
tracepoint(__VA_ARGS__)
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
bool ros_trace_compile_status()
|
bool ros_trace_compile_status()
|
||||||
{
|
{
|
||||||
#if defined(WITH_LTTNG) && !defined(_WIN32)
|
#if defined(TRACETOOLS_LTTNG_ENABLED) && !defined(_WIN32)
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
#if defined(WITH_LTTNG) && !defined(_WIN32)
|
#if defined(TRACETOOLS_LTTNG_ENABLED) && !defined(_WIN32)
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
const char * get_symbol(void * funptr)
|
const char * get_symbol(void * funptr)
|
||||||
{
|
{
|
||||||
#define SYMBOL_UNKNOWN "UNKNOWN"
|
#define SYMBOL_UNKNOWN "UNKNOWN"
|
||||||
#if defined(WITH_LTTNG) && !defined(_WIN32)
|
#if defined(TRACETOOLS_LTTNG_ENABLED) && !defined(_WIN32)
|
||||||
#define SYMBOL_LAMBDA "[lambda]"
|
#define SYMBOL_LAMBDA "[lambda]"
|
||||||
if (funptr == 0) {
|
if (funptr == 0) {
|
||||||
return SYMBOL_LAMBDA;
|
return SYMBOL_LAMBDA;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue