From 0dd4526f5c75f23aba886bee2d9850a70aa67ca8 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Thu, 24 Mar 2016 20:51:55 +0100 Subject: lib: Shared Memory Updated tests. Added code to drop a corner case (packet where the tail PCI would cross the edge of the ring buffer) because solving this very rare case is not worth the performance hit on the ringbuffer the extra code would incur. This means the ringbuffer might drop a very small percentage of packets. --- src/lib/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/lib/CMakeLists.txt') diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index e81f3475..7ce98bf2 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -4,6 +4,16 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_BINARY_DIR}/include) +find_library(LIBRT_LIBRARIES rt) +if(NOT LIBRT_LIBRARIES) + message(FATAL_ERROR "librt not found") +endif() + +find_library(LIBPTHREAD_LIBRARIES pthread) +if(NOT LIBPTHREAD_LIBRARIES) + message(FATAL_ERROR "libpthread not found") +endif() + set(SOURCE_FILES # Add source files here bitmap.c @@ -15,11 +25,13 @@ set(SOURCE_FILES irm.c list.c rina_name.c + shm_du_map.c sockets.c utils.c ) add_library(ouroboros SHARED ${SOURCE_FILES}) +target_link_libraries(ouroboros rt pthread) include(MacroAddCompileFlags) if (CMAKE_BUILD_TYPE MATCHES Debug) -- cgit v1.2.3