summaryrefslogtreecommitdiff
path: root/src/lib/CMakeLists.txt
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-03-24 20:51:55 +0100
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-03-24 20:51:55 +0100
commit0dd4526f5c75f23aba886bee2d9850a70aa67ca8 (patch)
tree3480b39405a9ce935a5d110ebfacc121f9440b37 /src/lib/CMakeLists.txt
parent545092a8eaa1a972a2bcaf1b532d74f21db1b623 (diff)
downloadouroboros-0dd4526f5c75f23aba886bee2d9850a70aa67ca8.tar.gz
ouroboros-0dd4526f5c75f23aba886bee2d9850a70aa67ca8.zip
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.
Diffstat (limited to 'src/lib/CMakeLists.txt')
-rw-r--r--src/lib/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
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)