forked from iovisor/bcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (26 loc) · 933 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
32 lines (26 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
include_directories(${CMAKE_SOURCE_DIR}/src/cc)
include_directories(${CMAKE_SOURCE_DIR}/src/cc/api)
add_executable(test_static test_static.c)
target_link_libraries(test_static bcc-static)
add_test(NAME c_test_static COMMAND ${TEST_WRAPPER} c_test_static sudo ${CMAKE_CURRENT_BINARY_DIR}/test_static)
if(ENABLE_USDT)
add_executable(test_libbcc
test_libbcc.cc
test_c_api.cc
test_array_table.cc
test_bpf_table.cc
test_hash_table.cc
test_perf_event.cc
test_prog_table.cc
test_usdt_args.cc
test_usdt_probes.cc
utils.cc)
target_link_libraries(test_libbcc bcc-shared dl)
add_test(NAME test_libbcc COMMAND ${TEST_WRAPPER} c_test_all sudo ${CMAKE_CURRENT_BINARY_DIR}/test_libbcc)
find_path(SDT_HEADER NAMES "sys/sdt.h")
if (SDT_HEADER)
target_compile_definitions(test_libbcc PRIVATE HAVE_SDT_HEADER=1)
endif()
endif(ENABLE_USDT)