Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enabled tracing for external project builds #140

Closed
wants to merge 8 commits into from
Prev Previous commit
Next Next commit
Moved tracing out of the project guard
jjhierck committed Oct 2, 2024
commit 39e3d7047cb828a0820e124879ddb0f660d78ca7
42 changes: 21 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -134,30 +134,30 @@ target_link_libraries(cactus_rt
# Use a bounded queue
target_compile_definitions(cactus_rt PUBLIC QUILL_USE_BOUNDED_QUEUE)

if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
if(ENABLE_TRACING)
message(STATUS "Building tracing targets. Turn it off via ENABLE_TRACING=OFF")

target_sources(cactus_rt
PRIVATE
src/cactus_rt/tracing/sink.cc
src/cactus_rt/tracing/thread_tracer.cc
src/cactus_rt/tracing/trace_aggregator.cc
src/cactus_rt/tracing/tracing_enabled.cc
src/cactus_rt/tracing/utils/string_interner.cc
)
if(ENABLE_TRACING)
message(STATUS "Building tracing targets. Turn it off via ENABLE_TRACING=OFF")

target_link_libraries(cactus_rt
PUBLIC
cactus_tracing_embedded_perfetto_protos
)
target_sources(cactus_rt
PRIVATE
src/cactus_rt/tracing/sink.cc
src/cactus_rt/tracing/thread_tracer.cc
src/cactus_rt/tracing/trace_aggregator.cc
src/cactus_rt/tracing/tracing_enabled.cc
src/cactus_rt/tracing/utils/string_interner.cc
)

target_compile_definitions(cactus_rt
PUBLIC
CACTUS_RT_TRACING_ENABLED=1
)
endif()
target_link_libraries(cactus_rt
PUBLIC
cactus_tracing_embedded_perfetto_protos
)

target_compile_definitions(cactus_rt
PUBLIC
CACTUS_RT_TRACING_ENABLED=1
)
endif()

if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
if(ENABLE_CLANG_TIDY)
find_program(CLANG_TIDY clang-tidy clang-tidy-18 clang-tidy-17 clang-tidy-16 clang-tidy-15 clang-tidy-14)
else()