| 1 |
set(CMAKE_BUILD_TYPE Debug) |
| 2 |
|
| 3 |
add_executable(test_c test.c) |
| 4 |
add_executable(test_cpp test.cpp) |
| 5 |
set_target_properties(test_cpp PROPERTIES |
| 6 |
INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/../../src/ |
| 7 |
) |
| 8 |
|
| 9 |
add_executable(threaded threaded.cpp) |
| 10 |
target_link_libraries(threaded ${CMAKE_THREAD_LIBS_INIT}) |
| 11 |
|
| 12 |
add_executable(callgraph callgraph.cpp) |
| 13 |
|
| 14 |
add_library(testlib SHARED lib.cpp) |
| 15 |
add_executable(test_lib test_lib.cpp) |
| 16 |
target_link_libraries(test_lib testlib) |
| 17 |
|
| 18 |
add_executable(test_aggregation test_aggregation.cpp) |
| 19 |
|
| 20 |
add_executable(signals signals.cpp) |
| 21 |
target_link_libraries(signals ${CMAKE_THREAD_LIBS_INIT}) |
| 22 |
|
| 23 |
add_executable(libc_leaks libc_leaks.c) |
| 24 |
|
| 25 |
add_executable(peak peak.c) |
| 26 |
set_target_properties(peak PROPERTIES |
| 27 |
COMPILE_FLAGS "-g3 -O0" |
| 28 |
) |
| 29 |
|
| 30 |
set(CMAKE_BUILD_TYPE RelWithDebInfo) |
| 31 |
|
| 32 |
add_executable(inlining inlining.cpp) |
| 33 |
|
| 34 |
add_executable(embedded_lsan_suppressions embedded_lsan_suppressions.c) |
| 35 |
|
| 36 |
add_library(testlib_indirect SHARED libindirect.cpp) |
| 37 |
target_link_libraries(testlib_indirect ${CMAKE_DL_LIBS}) |
| 38 |
|
| 39 |
add_executable(dlopen dlopen.cpp) |
| 40 |
target_compile_definitions(dlopen PRIVATE -DLIB_PATH="$<TARGET_FILE:testlib_indirect>") |
| 41 |
target_link_libraries(dlopen ${CMAKE_DL_LIBS}) |
| 42 |
|
| 43 |
if (NOT CMAKE_GENERATOR STREQUAL "Unix Makefiles") |
| 44 |
add_subdirectory("with space") |
| 45 |
endif() |