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

daemon: link librt (Fix issue #73) #74

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ add_bpf_skel_generating_target(bpftime_daemon_ebpf_skel ${CMAKE_CURRENT_BINARY_D

add_dependencies(bpftime_daemon_ebpf_skel bpftime_daemon_ebpf_target)

add_library(libbpftime_daemon STATIC
user/bpf_tracer.cpp
add_library(libbpftime_daemon STATIC
user/bpf_tracer.cpp
user/handle_bpf_event.cpp
user/bpftime_driver.cpp
)
Expand All @@ -16,27 +16,29 @@ add_executable(bpftime_daemon
user/main.cpp
)

add_dependencies(libbpftime_daemon
bpftime_daemon_ebpf_skel
libbpf
spdlog::spdlog
runtime
)
add_dependencies(libbpftime_daemon
bpftime_daemon_ebpf_skel
libbpf
spdlog::spdlog
runtime
)

target_include_directories(libbpftime_daemon PRIVATE
${CMAKE_CURRENT_BINARY_DIR}
target_include_directories(libbpftime_daemon PRIVATE
${CMAKE_CURRENT_BINARY_DIR}
${LIBBPF_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../vm/include
${CMAKE_CURRENT_SOURCE_DIR}/../runtime/include
)
target_link_libraries(libbpftime_daemon PRIVATE
${LIBBPF_LIBRARIES}
elf
z
spdlog::spdlog
runtime
)
target_link_libraries(libbpftime_daemon PRIVATE
${LIBBPF_LIBRARIES}
elf
z
spdlog::spdlog
runtime
PUBLIC
rt
)
set_property(TARGET libbpftime_daemon PROPERTY CXX_STANDARD 20)

add_dependencies(bpftime_daemon libbpftime_daemon)
Expand All @@ -45,6 +47,5 @@ target_link_libraries(bpftime_daemon PRIVATE libbpftime_daemon)
install(TARGETS bpftime_daemon CONFIGURATIONS Release Debug DESTINATION ~/.bpftime)

if(BPFTIME_ENABLE_UNIT_TESTING)
add_subdirectory(test)
add_subdirectory(test)
endif()

Loading