Only build and run tracing tests if LTTng is enabled and found
This commit is contained in:
parent
05863a35c6
commit
3542aab984
3 changed files with 43 additions and 24 deletions
|
@ -91,9 +91,12 @@ if(BUILD_TESTING)
|
|||
find_package(ament_lint_auto REQUIRED)
|
||||
ament_lint_auto_find_test_dependencies()
|
||||
|
||||
ament_add_gtest(test_utils test/test_utils.cpp)
|
||||
if(TARGET test_utils)
|
||||
target_link_libraries(test_utils ${PROJECT_NAME} -rdynamic)
|
||||
# Only build tracetools utils tests if LTTng is enabled and found
|
||||
if(TRACETOOLS_LTTNG_ENABLED)
|
||||
ament_add_gtest(test_utils test/test_utils.cpp)
|
||||
if(TARGET test_utils)
|
||||
target_link_libraries(test_utils ${PROJECT_NAME} -rdynamic)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue