1ADD_LIBRARY(default_engine SHARED
2            assoc.cc
3            assoc.h
4            default_engine.cc
5            default_engine_internal.h
6            engine_manager.cc
7            engine_manager.h
8            items.cc
9            items.h
10            scrubber_task.cc
11            scrubber_task.h
12            slabs.cc
13            slabs.h)
14
15SET_TARGET_PROPERTIES(default_engine PROPERTIES PREFIX "")
16
17IF (ENABLE_DTRACE)
18  ADD_DEPENDENCIES(default_engine generate_memcached_dtrace_h)
19  IF (DTRACE_NEED_INSTRUMENT)
20      ADD_CUSTOM_COMMAND(TARGET default_engine PRE_LINK
21                         COMMAND
22                         ${DTRACE} -o de_dtrace.o
23                                   -G
24                                   -s ${Memcached_SOURCE_DIR}/memcached_dtrace.d
25                                   *.o
26                         WORKING_DIRECTORY ${Memcached_BINARY_DIR}/engines/default_engine/CMakeFiles/default_engine.dir)
27      SET_TARGET_PROPERTIES(default_engine PROPERTIES LINK_FLAGS
28        "${Memcached_BINARY_DIR}/engines/default_engine/CMakeFiles/default_engine.dir/de_dtrace.o")
29  ENDIF (DTRACE_NEED_INSTRUMENT)
30ENDIF (ENABLE_DTRACE)
31
32TARGET_LINK_LIBRARIES(default_engine memcached_logger engine_utilities mcd_util platform ${COUCHBASE_NETWORK_LIBS})
33
34INSTALL(TARGETS default_engine
35        RUNTIME DESTINATION bin
36        LIBRARY DESTINATION lib
37        ARCHIVE DESTINATION lib)
38
39if (COUCHBASE_KV_BUILD_UNIT_TESTS)
40    if (NOT WIN32)
41        include_directories(AFTER
42                            ${benchmark_SOURCE_DIR}/include)
43
44        add_executable(assoc_bench_test
45                       assoc.h
46                       assoc.cc
47                       assoc_bench_test.cc)
48        target_link_libraries(assoc_bench_test default_engine benchmark platform)
49    endif (NOT WIN32)
50endif (COUCHBASE_KV_BUILD_UNIT_TESTS)
51