1 include("${TURF_ROOT}/cmake/Macros.cmake")
3 find_path(NBDS_ROOT NAMES
12 set(NBDS_INCLUDE_DIRS ${NBDS_ROOT}/include)
13 GetFilesWithSourceGroups(GLOB_RECURSE NBDS_FILES ${NBDS_ROOT} ${NBDS_ROOT}/include/*
14 ${NBDS_ROOT}/runtime/runtime.c
15 ${NBDS_ROOT}/runtime/rcu.c
16 ${NBDS_ROOT}/runtime/lwt.c
17 ${NBDS_ROOT}/runtime/random.c
18 ${NBDS_ROOT}/datatype/nstring.c
19 ${NBDS_ROOT}/runtime/hazard.c
20 ${NBDS_ROOT}/map/map.c
21 ${NBDS_ROOT}/map/list.c
22 ${NBDS_ROOT}/map/skiplist.c
23 ${NBDS_ROOT}/map/hashtable.c)
24 if(NBDS_USE_TURF_HEAP)
25 add_definitions(-DUSE_SYSTEM_MALLOC=1)
27 GetFilesWithSourceGroups(GLOB NBDS_FILES ${NBDS_ROOT} ${NBDS_ROOT}/runtime/mem.c)
29 # FIXME: This is hacky because it relies on inheriting the same include_directories() as Junction
30 add_library(NBDS ${NBDS_FILES})
31 set(NBDS_LIBRARIES NBDS)
33 message("Can't find NBDS!")
34 if(NBDS_FIND_REQUIRED)
35 message(FATAL_ERROR "Missing required package NBDS")