Sat, 16 Apr 2022 20:17:01 +0200
improve testing allocator + add tests for it
universe@375 | 1 | set(sources |
universe@483 | 2 | utils.c |
universe@391 | 3 | allocator.c |
universe@503 | 4 | list.c |
universe@398 | 5 | linked_list.c |
olaf@424 | 6 | tree.c |
universe@483 | 7 | buffer.c |
universe@375 | 8 | ) |
universe@377 | 9 | set(headers |
universe@483 | 10 | cx/utils.h |
universe@391 | 11 | cx/allocator.h |
universe@494 | 12 | cx/iterator.h |
universe@390 | 13 | cx/list.h |
universe@398 | 14 | cx/linked_list.h |
universe@470 | 15 | cx/tree.h |
universe@483 | 16 | cx/buffer.h |
universe@377 | 17 | ) |
universe@375 | 18 | |
universe@375 | 19 | add_library(ucx SHARED ${sources}) |
universe@375 | 20 | add_library(ucx_static STATIC ${sources}) |
universe@375 | 21 | |
universe@375 | 22 | target_include_directories(ucx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
universe@375 | 23 | target_include_directories(ucx_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
universe@375 | 24 | |
universe@390 | 25 | set_target_properties(ucx PROPERTIES SOVERSION 4 VERSION 4.0.0) |
universe@375 | 26 | set_target_properties(ucx_static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION}) |
universe@377 | 27 | |
universe@377 | 28 | # it is sufficient to specify the headers for one of the targets |
universe@377 | 29 | set_target_properties(ucx PROPERTIES PUBLIC_HEADER "${headers}") |
universe@377 | 30 | |
universe@377 | 31 | include(GNUInstallDirs) |
universe@377 | 32 | install(TARGETS ucx ucx_static |
universe@377 | 33 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
universe@377 | 34 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
universe@377 | 35 | PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ucx) |