CMake build system introduced (issue #9)
authorEugeny Kalishenko <ydginster@gmail.com>
Sun, 19 Apr 2015 10:28:12 +0000 (13:28 +0300)
committerkel <ydginster@gmail.com>
Sun, 19 Apr 2015 10:54:58 +0000 (13:54 +0300)
CMakeLists.txt
src/CMakeLists.txt [deleted file]
tests/CMakeLists.txt [new file with mode: 0644]
tests/test-hdr/CMakeLists.txt [new file with mode: 0644]
tests/unit/CMakeLists.txt [new file with mode: 0644]
tests/unit/map2/CMakeLists.txt [new file with mode: 0644]
tests/unit/pqueue/CMakeLists.txt [new file with mode: 0644]
tests/unit/queue/CMakeLists.txt [new file with mode: 0644]
tests/unit/set2/CMakeLists.txt [new file with mode: 0644]
tests/unit/stack/CMakeLists.txt [new file with mode: 0644]

index aad0857..68c1e04 100644 (file)
@@ -1,43 +1,99 @@
-cmake_minimum_required(VERSION 2.8.10)
+cmake_minimum_required(VERSION 2.8.12)
 cmake_policy(SET CMP0016 NEW)
 
 project(cds)
 
 set(PROJECT_VERSION 2.1.0)
 
+# Options
+option(WITH_TESTS "Build unit tests" OFF)
+
+find_package(Threads REQUIRED)
 find_package(Boost COMPONENTS system thread REQUIRED)
 include_directories(${Boost_INCLUDE_DIRS})
 
 set(CDS_SHARED_LIBRARY ${PROJECT_NAME})
 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+
+if (NOT CMAKE_BUILD_TYPE)
+  set(CMAKE_BUILD_TYPE Debug CACHE STRING "Default build type to Debug" FORCE)
+endif()
+
+message("Build type -- ${CMAKE_BUILD_TYPE}")
 
 if(UNIX)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 endif()
 
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
+
 include_directories(${CMAKE_SOURCE_DIR})
 
-enable_testing()
+# Component names for separate distribution in rpms, debs etc.
+set(LIBRARIES_COMPONENT lib)
+set(HEADERS_COMPONENT devel)
 
-add_subdirectory(${CMAKE_SOURCE_DIR}/src)
+set(SOURCES src/hp_gc.cpp
+            src/init.cpp
+            src/dhp_gc.cpp
+            src/urcu_gp.cpp
+            src/urcu_sh.cpp
+            src/michael_heap.cpp
+            src/topology_hpux.cpp
+            src/topology_linux.cpp
+            src/topology_osx.cpp
+            src/dllmain.cpp)
 
-### FOR PACKAGING #####################################################################################
+add_library(${CDS_SHARED_LIBRARY} SHARED ${SOURCES})
+target_link_libraries(${CDS_SHARED_LIBRARY} PRIVATE ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+
+install(TARGETS ${CDS_SHARED_LIBRARY} DESTINATION lib COMPONENT ${LIBRARIES_COMPONENT})
+install(DIRECTORY ${CMAKE_SOURCE_DIR}/cds DESTINATION include COMPONENT ${HEADERS_COMPONENT})
+
+if(WITH_TESTS)
+  enable_testing()
+  add_subdirectory(${CMAKE_SOURCE_DIR}/tests)
+endif(WITH_TESTS)
+
+### FOR PACKAGING in RPM, TGZ...###############################################################################
 set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
 set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
 set(CPACK_PACKAGE_RELEASE 1)
-
-set(CPACK_RPM_PACKAGE_SUMMARY "Library of concurrent data structures")
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/install/description.txt")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Library of concurrent data structures")
+set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}")
+set(DEPLOY_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}")
+
+# TGZ specific
+set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
+
+# RPM specific
+set(CPACK_RPM_COMPONENT_INSTALL ON)
 set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/install/post_install_script.sh")
 set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/install/post_uninstall_script.sh")
 #set(CPACK_RPM_CHANGELOG_FILE ${CHANGELOG_INCLUDE})
 set(CPACK_RPM_PACKAGE_LICENSE GPL)
 set(CPACK_RPM_PACKAGE_GROUP "System Environment/Base")
 set(CPACK_RPM_PACKAGE_REQUIRES "boost >= 1.50")
-
 set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${CPACK_PACKAGING_INSTALL_PREFIX})
 set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION /usr/local)
-set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}")
-set(DEPLOY_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}")
 
-include(CPack)
+# DEB specific
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "boost (>= 1.50)")
+
+# Components grouping for Mac OS X and Windows installers
+set(CPACK_COMPONENT_${LIBRARIES_COMPONENT}_GROUP "Runtime")
+set(CPACK_COMPONENT_${HEADERS_COMPONENT}_GROUP "Development")
+set(CPACK_COMPONENT_${LIBRARIES_COMPONENT}_DISPLAY_NAME "Libraries")
+set(CPACK_COMPONENT_${HEADERS_COMPONENT}_DISPLAY_NAME "C++ Headers")
+
+set(CPACK_COMPONENT_${HEADERS_COMPONENT}_DEPENDS ${LIBRARIES_COMPONENT})
+
+set(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "All of the tools you'll ever need to develop lock-free oriented software with libcds")
+set(CPACK_COMPONENT_GROUP_RUNTIME_DESCRIPTION "Only libcds library for runtime")
+
+include(CPack)
\ No newline at end of file
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
deleted file mode 100644 (file)
index 418b8c8..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-set(SOURCES hp_gc.cpp\r
-            init.cpp\r
-            dhp_gc.cpp\r
-            urcu_gp.cpp\r
-            urcu_sh.cpp\r
-            michael_heap.cpp\r
-            topology_hpux.cpp\r
-            topology_linux.cpp\r
-            topology_osx.cpp\r
-            dllmain.cpp)\r
-\r
-add_library(${CDS_SHARED_LIBRARY} SHARED ${SOURCES})\r
-target_link_libraries(${CDS_SHARED_LIBRARY} PRIVATE ${Boost_LIBRARIES})\r
-\r
-install(TARGETS ${CDS_SHARED_LIBRARY} DESTINATION lib)
\ No newline at end of file
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ea088b8
--- /dev/null
@@ -0,0 +1,13 @@
+set(TEST_COMMON test-common)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+set(SOURCES cppunit/test_main.cpp
+            cppunit/thread.cpp
+            unit/michael_alloc.cpp
+            unit/ellen_bintree_update_desc_pool.cpp)
+
+add_library(${TEST_COMMON} OBJECT ${SOURCES})
+
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test-hdr)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/unit)
\ No newline at end of file
diff --git a/tests/test-hdr/CMakeLists.txt b/tests/test-hdr/CMakeLists.txt
new file mode 100644 (file)
index 0000000..16eb8f9
--- /dev/null
@@ -0,0 +1,395 @@
+set(PACKAGE_NAME test-hdr)\r
+\r
+set(CDS_TESTHDR_MAP\r
+    map/hdr_michael_map_hp.cpp\r
+    map/hdr_michael_map_dhp.cpp\r
+    map/hdr_michael_map_rcu_gpi.cpp\r
+    map/hdr_michael_map_rcu_gpb.cpp\r
+    map/hdr_michael_map_rcu_gpt.cpp\r
+    map/hdr_michael_map_rcu_shb.cpp\r
+    map/hdr_michael_map_rcu_sht.cpp\r
+    map/hdr_michael_map_nogc.cpp\r
+    map/hdr_michael_map_lazy_hp.cpp\r
+    map/hdr_michael_map_lazy_dhp.cpp\r
+    map/hdr_michael_map_lazy_rcu_gpi.cpp\r
+    map/hdr_michael_map_lazy_rcu_gpb.cpp\r
+    map/hdr_michael_map_lazy_rcu_gpt.cpp\r
+    map/hdr_michael_map_lazy_rcu_shb.cpp\r
+    map/hdr_michael_map_lazy_rcu_sht.cpp\r
+    map/hdr_michael_map_lazy_nogc.cpp\r
+    map/hdr_refinable_hashmap_hashmap_std.cpp\r
+    map/hdr_refinable_hashmap_boost_list.cpp\r
+    map/hdr_refinable_hashmap_list.cpp\r
+    map/hdr_refinable_hashmap_map.cpp\r
+    map/hdr_refinable_hashmap_boost_map.cpp\r
+    map/hdr_refinable_hashmap_boost_flat_map.cpp\r
+    map/hdr_refinable_hashmap_boost_unordered_map.cpp\r
+    map/hdr_refinable_hashmap_slist.cpp\r
+    map/hdr_skiplist_map_hp.cpp\r
+    map/hdr_skiplist_map_dhp.cpp\r
+    map/hdr_skiplist_map_rcu_gpi.cpp\r
+    map/hdr_skiplist_map_rcu_gpb.cpp\r
+    map/hdr_skiplist_map_rcu_gpt.cpp\r
+    map/hdr_skiplist_map_rcu_shb.cpp\r
+    map/hdr_skiplist_map_rcu_sht.cpp\r
+    map/hdr_skiplist_map_nogc.cpp\r
+    map/hdr_splitlist_map_hp.cpp\r
+    map/hdr_splitlist_map_dhp.cpp\r
+    map/hdr_splitlist_map_nogc.cpp\r
+    map/hdr_splitlist_map_rcu_gpi.cpp\r
+    map/hdr_splitlist_map_rcu_gpb.cpp\r
+    map/hdr_splitlist_map_rcu_gpt.cpp\r
+    map/hdr_splitlist_map_rcu_shb.cpp\r
+    map/hdr_splitlist_map_rcu_sht.cpp\r
+    map/hdr_splitlist_map_lazy_hp.cpp\r
+    map/hdr_splitlist_map_lazy_dhp.cpp\r
+    map/hdr_splitlist_map_lazy_nogc.cpp\r
+    map/hdr_splitlist_map_lazy_rcu_gpi.cpp\r
+    map/hdr_splitlist_map_lazy_rcu_gpb.cpp\r
+    map/hdr_splitlist_map_lazy_rcu_gpt.cpp\r
+    map/hdr_splitlist_map_lazy_rcu_sht.cpp\r
+    map/hdr_splitlist_map_lazy_rcu_shb.cpp\r
+    map/hdr_striped_hashmap_hashmap_std.cpp\r
+    map/hdr_striped_hashmap_boost_list.cpp\r
+    map/hdr_striped_hashmap_list.cpp\r
+    map/hdr_striped_hashmap_map.cpp\r
+    map/hdr_striped_hashmap_boost_map.cpp\r
+    map/hdr_striped_hashmap_boost_flat_map.cpp\r
+    map/hdr_striped_hashmap_boost_unordered_map.cpp\r
+    map/hdr_striped_hashmap_slist.cpp\r
+    map/hdr_striped_map_reg.cpp)\r
+\r
+set(CDS_TESTHDR_DEQUE\r
+    deque/hdr_fcdeque.cpp)\r
+\r
+set(CDS_TESTHDR_LIST\r
+    list/hdr_lazy_dhp.cpp\r
+    list/hdr_lazy_hp.cpp\r
+    list/hdr_lazy_nogc.cpp\r
+    list/hdr_lazy_nogc_unord.cpp
+    list/hdr_lazy_rcu_gpi.cpp\r
+    list/hdr_lazy_rcu_gpb.cpp\r
+    list/hdr_lazy_rcu_gpt.cpp\r
+    list/hdr_lazy_rcu_shb.cpp\r
+    list/hdr_lazy_rcu_sht.cpp\r
+    list/hdr_lazy_kv_dhp.cpp\r
+    list/hdr_lazy_kv_hp.cpp\r
+    list/hdr_lazy_kv_nogc.cpp\r
+    list/hdr_lazy_kv_nogc_unord.cpp
+    list/hdr_lazy_kv_rcu_gpb.cpp\r
+    list/hdr_lazy_kv_rcu_gpi.cpp\r
+    list/hdr_lazy_kv_rcu_gpt.cpp\r
+    list/hdr_lazy_kv_rcu_shb.cpp\r
+    list/hdr_lazy_kv_rcu_sht.cpp\r
+    list/hdr_michael_dhp.cpp\r
+    list/hdr_michael_hp.cpp\r
+    list/hdr_michael_nogc.cpp\r
+    list/hdr_michael_rcu_gpi.cpp\r
+    list/hdr_michael_rcu_gpb.cpp\r
+    list/hdr_michael_rcu_gpt.cpp\r
+    list/hdr_michael_rcu_shb.cpp\r
+    list/hdr_michael_rcu_sht.cpp\r
+    list/hdr_michael_kv_dhp.cpp\r
+    list/hdr_michael_kv_hp.cpp\r
+    list/hdr_michael_kv_nogc.cpp\r
+    list/hdr_michael_kv_rcu_gpi.cpp\r
+    list/hdr_michael_kv_rcu_gpb.cpp\r
+    list/hdr_michael_kv_rcu_gpt.cpp\r
+    list/hdr_michael_kv_rcu_shb.cpp\r
+    list/hdr_michael_kv_rcu_sht.cpp)\r
+\r
+set(CDS_TESTHDR_PQUEUE\r
+    priority_queue/hdr_intrusive_mspqueue_dyn.cpp\r
+    priority_queue/hdr_intrusive_mspqueue_static.cpp\r
+    priority_queue/hdr_mspqueue_dyn.cpp\r
+    priority_queue/hdr_mspqueue_static.cpp\r
+    priority_queue/hdr_fcpqueue_boost_stable_vector.cpp\r
+    priority_queue/hdr_fcpqueue_deque.cpp\r
+    priority_queue/hdr_fcpqueue_vector.cpp\r
+    priority_queue/hdr_priority_queue_reg.cpp)\r
+\r
+set(CDS_TESTHDR_QUEUE\r
+    queue/hdr_queue_register.cpp\r
+    queue/hdr_intrusive_fcqueue.cpp\r
+    queue/hdr_intrusive_segmented_queue_hp.cpp\r
+    queue/hdr_intrusive_segmented_queue_dhp.cpp\r
+    queue/hdr_intrusive_tsigas_cycle_queue.cpp\r
+    queue/hdr_intrusive_vyukovmpmc_cycle_queue.cpp\r
+    queue/hdr_basketqueue_hp.cpp\r
+    queue/hdr_basketqueue_dhp.cpp\r
+    queue/hdr_fcqueue.cpp\r
+    queue/hdr_moirqueue_hp.cpp\r
+    queue/hdr_moirqueue_dhp.cpp\r
+    queue/hdr_msqueue_hp.cpp\r
+    queue/hdr_msqueue_dhp.cpp\r
+    queue/hdr_optimistic_hp.cpp\r
+    queue/hdr_optimistic_dhp.cpp\r
+    queue/hdr_rwqueue.cpp\r
+    queue/hdr_segmented_queue_hp.cpp\r
+    queue/hdr_segmented_queue_dhp.cpp\r
+    queue/hdr_tsigas_cycle_queue.cpp\r
+    queue/hdr_vyukov_mpmc_cyclic.cpp)\r
+\r
+set(CDS_TESTHDR_SET\r
+    set/hdr_intrusive_refinable_hashset_avlset.cpp\r
+    set/hdr_intrusive_refinable_hashset_list.cpp\r
+    set/hdr_intrusive_refinable_hashset_set.cpp\r
+    set/hdr_intrusive_refinable_hashset_sgset.cpp\r
+    set/hdr_intrusive_refinable_hashset_slist.cpp\r
+    set/hdr_intrusive_refinable_hashset_splayset.cpp\r
+    set/hdr_intrusive_refinable_hashset_treapset.cpp\r
+    set/hdr_intrusive_refinable_hashset_uset.cpp\r
+    set/hdr_intrusive_skiplist_hp.cpp\r
+    set/hdr_intrusive_skiplist_dhp.cpp\r
+    set/hdr_intrusive_skiplist_rcu_gpb.cpp\r
+    set/hdr_intrusive_skiplist_rcu_gpi.cpp\r
+    set/hdr_intrusive_skiplist_rcu_gpt.cpp\r
+    set/hdr_intrusive_skiplist_rcu_shb.cpp\r
+    set/hdr_intrusive_skiplist_rcu_sht.cpp\r
+    set/hdr_intrusive_skiplist_nogc.cpp\r
+    set/hdr_intrusive_striped_hashset_avlset.cpp\r
+    set/hdr_intrusive_striped_hashset_list.cpp\r
+    set/hdr_intrusive_striped_hashset_set.cpp\r
+    set/hdr_intrusive_striped_hashset_sgset.cpp\r
+    set/hdr_intrusive_striped_hashset_slist.cpp\r
+    set/hdr_intrusive_striped_hashset_splayset.cpp\r
+    set/hdr_intrusive_striped_hashset_treapset.cpp\r
+    set/hdr_intrusive_striped_hashset_uset.cpp\r
+    set/hdr_intrusive_striped_set.cpp\r
+    set/hdr_michael_set_hp.cpp\r
+    set/hdr_michael_set_dhp.cpp\r
+    set/hdr_michael_set_rcu_gpi.cpp\r
+    set/hdr_michael_set_rcu_gpb.cpp\r
+    set/hdr_michael_set_rcu_gpt.cpp\r
+    set/hdr_michael_set_rcu_shb.cpp\r
+    set/hdr_michael_set_rcu_sht.cpp\r
+    set/hdr_michael_set_nogc.cpp\r
+    set/hdr_michael_set_lazy_hp.cpp\r
+    set/hdr_michael_set_lazy_dhp.cpp\r
+    set/hdr_michael_set_lazy_rcu_gpi.cpp\r
+    set/hdr_michael_set_lazy_rcu_gpb.cpp\r
+    set/hdr_michael_set_lazy_rcu_gpt.cpp\r
+    set/hdr_michael_set_lazy_rcu_shb.cpp\r
+    set/hdr_michael_set_lazy_rcu_sht.cpp\r
+    set/hdr_michael_set_lazy_nogc.cpp\r
+    set/hdr_refinable_hashset_hashset_std.cpp\r
+    set/hdr_refinable_hashset_boost_flat_set.cpp\r
+    set/hdr_refinable_hashset_boost_list.cpp\r
+    set/hdr_refinable_hashset_boost_set.cpp\r
+    set/hdr_refinable_hashset_boost_stable_vector.cpp\r
+    set/hdr_refinable_hashset_boost_unordered_set.cpp\r
+    set/hdr_refinable_hashset_boost_vector.cpp\r
+    set/hdr_refinable_hashset_list.cpp\r
+    set/hdr_refinable_hashset_set.cpp\r
+    set/hdr_refinable_hashset_slist.cpp\r
+    set/hdr_refinable_hashset_vector.cpp\r
+    set/hdr_skiplist_set_hp.cpp\r
+    set/hdr_skiplist_set_dhp.cpp\r
+    set/hdr_skiplist_set_rcu_gpi.cpp\r
+    set/hdr_skiplist_set_rcu_gpb.cpp\r
+    set/hdr_skiplist_set_rcu_gpt.cpp\r
+    set/hdr_skiplist_set_rcu_shb.cpp\r
+    set/hdr_skiplist_set_rcu_sht.cpp\r
+    set/hdr_skiplist_set_nogc.cpp\r
+    set/hdr_splitlist_set_hp.cpp\r
+    set/hdr_splitlist_set_nogc.cpp\r
+    set/hdr_splitlist_set_dhp.cpp\r
+    set/hdr_splitlist_set_rcu_gpi.cpp\r
+    set/hdr_splitlist_set_rcu_gpb.cpp\r
+    set/hdr_splitlist_set_rcu_gpt.cpp\r
+    set/hdr_splitlist_set_rcu_shb.cpp\r
+    set/hdr_splitlist_set_rcu_sht.cpp\r
+    set/hdr_splitlist_set_lazy_hp.cpp\r
+    set/hdr_splitlist_set_lazy_nogc.cpp\r
+    set/hdr_splitlist_set_lazy_dhp.cpp\r
+    set/hdr_splitlist_set_lazy_rcu_gpi.cpp\r
+    set/hdr_splitlist_set_lazy_rcu_gpb.cpp\r
+    set/hdr_splitlist_set_lazy_rcu_gpt.cpp\r
+    set/hdr_splitlist_set_lazy_rcu_shb.cpp\r
+    set/hdr_splitlist_set_lazy_rcu_sht.cpp\r
+    set/hdr_striped_hashset_hashset_std.cpp\r
+    set/hdr_striped_hashset_boost_flat_set.cpp\r
+    set/hdr_striped_hashset_boost_list.cpp\r
+    set/hdr_striped_hashset_boost_set.cpp\r
+    set/hdr_striped_hashset_boost_stable_vector.cpp\r
+    set/hdr_striped_hashset_boost_unordered_set.cpp\r
+    set/hdr_striped_hashset_boost_vector.cpp\r
+    set/hdr_striped_hashset_list.cpp\r
+    set/hdr_striped_hashset_set.cpp\r
+    set/hdr_striped_hashset_slist.cpp\r
+    set/hdr_striped_hashset_vector.cpp)\r
+\r
+set(CDS_TESTHDR_STACK\r
+    stack/hdr_intrusive_fcstack.cpp\r
+    stack/hdr_treiber_stack_hp.cpp\r
+    stack/hdr_treiber_stack_dhp.cpp\r
+    stack/hdr_elimination_stack_hp.cpp\r
+    stack/hdr_elimination_stack_dhp.cpp\r
+    stack/hdr_fcstack.cpp)\r
+\r
+set(CDS_TESTHDR_TREE\r
+    tree/hdr_tree_reg.cpp
+    tree/hdr_intrusive_ellen_bintree_hp.cpp
+    tree/hdr_intrusive_ellen_bintree_dhp.cpp
+    tree/hdr_intrusive_ellen_bintree_rcu_gpb.cpp
+    tree/hdr_intrusive_ellen_bintree_rcu_gpi.cpp
+    tree/hdr_intrusive_ellen_bintree_rcu_gpt.cpp
+    tree/hdr_intrusive_ellen_bintree_rcu_shb.cpp
+    tree/hdr_intrusive_ellen_bintree_rcu_sht.cpp
+    tree/hdr_ellenbintree_map_hp.cpp
+    tree/hdr_ellenbintree_map_dhp.cpp
+    tree/hdr_ellenbintree_map_rcu_gpb.cpp
+    tree/hdr_ellenbintree_map_rcu_gpi.cpp
+    tree/hdr_ellenbintree_map_rcu_gpt.cpp
+    tree/hdr_ellenbintree_map_rcu_shb.cpp
+    tree/hdr_ellenbintree_map_rcu_sht.cpp
+    tree/hdr_ellenbintree_set_hp.cpp
+    tree/hdr_ellenbintree_set_dhp.cpp
+    tree/hdr_ellenbintree_set_rcu_gpb.cpp
+    tree/hdr_ellenbintree_set_rcu_gpi.cpp
+    tree/hdr_ellenbintree_set_rcu_gpt.cpp
+    tree/hdr_ellenbintree_set_rcu_shb.cpp
+    tree/hdr_ellenbintree_set_rcu_sht.cpp
+    tree/hdr_bronson_avltree_map_rcu_gpb.cpp
+    tree/hdr_bronson_avltree_map_rcu_gpb_pool_monitor.cpp
+    tree/hdr_bronson_avltree_map_rcu_gpi.cpp
+    tree/hdr_bronson_avltree_map_rcu_gpi_pool_monitor.cpp
+    tree/hdr_bronson_avltree_map_rcu_gpt.cpp
+    tree/hdr_bronson_avltree_map_rcu_gpt_pool_monitor.cpp
+    tree/hdr_bronson_avltree_map_rcu_shb.cpp
+    tree/hdr_bronson_avltree_map_rcu_shb_pool_monitor.cpp
+    tree/hdr_bronson_avltree_map_rcu_sht.cpp
+    tree/hdr_bronson_avltree_map_rcu_sht_pool_monitor.cpp
+   )
+
+set(CDS_TESTHDR_MISC\r
+    misc/cxx11_atomic_class.cpp\r
+    misc/cxx11_atomic_func.cpp\r
+    misc/find_option.cpp\r
+    misc/allocator_test.cpp\r
+    misc/michael_allocator.cpp\r
+    misc/hash_tuple.cpp\r
+    misc/bitop_st.cpp\r
+    misc/permutation_generator.cpp\r
+    misc/thread_init_fini.cpp)\r
+\r
+set(CDS_TESTHDR_OFFSETOF_MAP\r
+    map/hdr_cuckoo_map.cpp)\r
+\r
+set(CDS_TESTHDR_OFFSETOF_SET\r
+    set/hdr_cuckoo_set.cpp\r
+    set/hdr_intrusive_cuckoo_set.cpp\r
+    set/hdr_intrusive_cuckoo_refinable_set.cpp\r
+    set/hdr_intrusive_michael_set_hp.cpp\r
+    set/hdr_intrusive_michael_set_dhp.cpp\r
+    set/hdr_intrusive_michael_set_nogc.cpp\r
+    set/hdr_intrusive_michael_set_rcu_gpi.cpp\r
+    set/hdr_intrusive_michael_set_rcu_gpb.cpp\r
+    set/hdr_intrusive_michael_set_rcu_gpt.cpp\r
+    set/hdr_intrusive_michael_set_rcu_shb.cpp\r
+    set/hdr_intrusive_michael_set_rcu_sht.cpp\r
+    set/hdr_intrusive_michael_set_hp_lazy.cpp\r
+    set/hdr_intrusive_michael_set_dhp_lazy.cpp\r
+    set/hdr_intrusive_michael_set_nogc_lazy.cpp\r
+    set/hdr_intrusive_michael_set_rcu_gpi_lazy.cpp\r
+    set/hdr_intrusive_michael_set_rcu_gpb_lazy.cpp\r
+    set/hdr_intrusive_michael_set_rcu_gpt_lazy.cpp\r
+    set/hdr_intrusive_michael_set_rcu_shb_lazy.cpp\r
+    set/hdr_intrusive_michael_set_rcu_sht_lazy.cpp\r
+    set/hdr_intrusive_skiplist_hp_member.cpp\r
+    set/hdr_intrusive_skiplist_dhp_member.cpp\r
+    set/hdr_intrusive_skiplist_rcu_gpi_member.cpp\r
+    set/hdr_intrusive_skiplist_rcu_gpb_member.cpp\r
+    set/hdr_intrusive_skiplist_rcu_gpt_member.cpp\r
+    set/hdr_intrusive_skiplist_rcu_shb_member.cpp\r
+    set/hdr_intrusive_skiplist_rcu_sht_member.cpp\r
+    set/hdr_intrusive_skiplist_nogc_member.cpp\r
+    set/hdr_intrusive_splitlist_set_hp.cpp\r
+    set/hdr_intrusive_splitlist_set_nogc.cpp\r
+    set/hdr_intrusive_splitlist_set_dhp.cpp\r
+    set/hdr_intrusive_splitlist_set_rcu_gpb.cpp\r
+    set/hdr_intrusive_splitlist_set_rcu_gpi.cpp\r
+    set/hdr_intrusive_splitlist_set_rcu_gpt.cpp\r
+    set/hdr_intrusive_splitlist_set_rcu_shb.cpp\r
+    set/hdr_intrusive_splitlist_set_rcu_sht.cpp\r
+    set/hdr_intrusive_splitlist_set_hp_lazy.cpp\r
+    set/hdr_intrusive_splitlist_set_nogc_lazy.cpp\r
+    set/hdr_intrusive_splitlist_set_dhp_lazy.cpp\r
+    set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp\r
+    set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp\r
+    set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp\r
+    set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp\r
+    set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp)\r
+\r
+set(CDS_TESTHDR_OFFSETOF_LIST\r
+    list/hdr_intrusive_lazy_dhp.cpp\r
+    list/hdr_intrusive_lazy_hp.cpp\r
+    list/hdr_intrusive_lazy_nogc.cpp\r
+    list/hdr_intrusive_lazy_nogc_unord.cpp
+    list/hdr_intrusive_lazy_rcu_gpb.cpp\r
+    list/hdr_intrusive_lazy_rcu_gpi.cpp\r
+    list/hdr_intrusive_lazy_rcu_gpt.cpp\r
+    list/hdr_intrusive_lazy_rcu_shb.cpp\r
+    list/hdr_intrusive_lazy_rcu_sht.cpp\r
+    list/hdr_intrusive_michael_dhp.cpp\r
+    list/hdr_intrusive_michael_hp.cpp\r
+    list/hdr_intrusive_michael_nogc.cpp\r
+    list/hdr_intrusive_michael_list_rcu_gpb.cpp\r
+    list/hdr_intrusive_michael_list_rcu_gpi.cpp\r
+    list/hdr_intrusive_michael_list_rcu_gpt.cpp\r
+    list/hdr_intrusive_michael_list_rcu_shb.cpp\r
+    list/hdr_intrusive_michael_list_rcu_sht.cpp)\r
+\r
+set(CDS_TESTHDR_OFFSETOF_QUEUE\r
+    queue/hdr_intrusive_basketqueue_hp.cpp\r
+    queue/hdr_intrusive_basketqueue_dhp.cpp\r
+    queue/hdr_intrusive_moirqueue_hp.cpp\r
+    queue/hdr_intrusive_moirqueue_dhp.cpp\r
+    queue/hdr_intrusive_msqueue_hp.cpp\r
+    queue/hdr_intrusive_msqueue_dhp.cpp\r
+    queue/hdr_intrusive_optimisticqueue_hp.cpp\r
+    queue/hdr_intrusive_optimisticqueue_dhp.cpp)\r
+\r
+set(CDS_TESTHDR_OFFSETOF_STACK\r
+    stack/hdr_intrusive_treiber_stack_hp.cpp\r
+    stack/hdr_intrusive_treiber_stack_dhp.cpp\r
+    stack/hdr_intrusive_elimination_stack_hp.cpp\r
+    stack/hdr_intrusive_elimination_stack_dhp.cpp)\r
+\r
+set(CDS_TESTHDR_OFFSETOF_TREE\r
+    tree/hdr_intrusive_ellen_bintree_hp_member.cpp\r
+    tree/hdr_intrusive_ellen_bintree_dhp_member.cpp\r
+    tree/hdr_intrusive_ellen_bintree_rcu_gpb_member.cpp\r
+    tree/hdr_intrusive_ellen_bintree_rcu_gpi_member.cpp\r
+    tree/hdr_intrusive_ellen_bintree_rcu_gpt_member.cpp\r
+    tree/hdr_intrusive_ellen_bintree_rcu_shb_member.cpp\r
+    tree/hdr_intrusive_ellen_bintree_rcu_sht_member.cpp)\r
+\r
+set(CDS_TESTHDR_OFFSETOF_SOURCES\r
+       ${CDS_TESTHDR_OFFSETOF_QUEUE}\r
+       ${CDS_TESTHDR_OFFSETOF_STACK}\r
+       ${CDS_TESTHDR_OFFSETOF_MAP}\r
+       ${CDS_TESTHDR_OFFSETOF_SET}\r
+       ${CDS_TESTHDR_OFFSETOF_LIST}\r
+       ${CDS_TESTHDR_OFFSETOF_TREE})\r
+\r
+add_library(test-hdr-offsetof OBJECT ${CDS_TESTHDR_OFFSETOF_SOURCES})\r
+\r
+if(CMAKE_COMPILER_IS_GNUCC)\r
+  set_property(TARGET test-hdr-offsetof APPEND_STRING PROPERTY COMPILE_FLAGS -Wno-invalid-offsetof)\r
+endif(CMAKE_COMPILER_IS_GNUCC)\r
+\r
+set(CDS_TESTHDR_SOURCES\r
+    ${CDS_TESTHDR_QUEUE}\r
+    ${CDS_TESTHDR_PQUEUE}\r
+    ${CDS_TESTHDR_STACK}\r
+    ${CDS_TESTHDR_MAP}\r
+    ${CDS_TESTHDR_DEQUE}\r
+    ${CDS_TESTHDR_LIST}\r
+    ${CDS_TESTHDR_SET}\r
+    ${CDS_TESTHDR_TREE}\r
+    ${CDS_TESTHDR_MISC})\r
+\r
+add_executable(${PACKAGE_NAME} ${CDS_TESTHDR_SOURCES} $<TARGET_OBJECTS:test-hdr-offsetof> $<TARGET_OBJECTS:${TEST_COMMON}>)\r
+target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})\r
+add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME})
\ No newline at end of file
diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ffd672d
--- /dev/null
@@ -0,0 +1,21 @@
+set(PACKAGE_NAME cdsu-misc)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+set(CDSUNIT_MISC_SOURCES
+    alloc/hoard_threadtest.cpp
+    alloc/larson.cpp
+    alloc/linux_scale.cpp
+    alloc/michael_allocator.cpp
+    alloc/random.cpp
+    lock/spinlock.cpp)
+
+add_executable(${PACKAGE_NAME} ${CDSUNIT_MAP_SOURCES} $<TARGET_OBJECTS:${TEST_COMMON}>)
+target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
+add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME})
+
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/map2)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pqueue)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/queue)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/set2)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stack)
\ No newline at end of file
diff --git a/tests/unit/map2/CMakeLists.txt b/tests/unit/map2/CMakeLists.txt
new file mode 100644 (file)
index 0000000..9cd5700
--- /dev/null
@@ -0,0 +1,101 @@
+set(PACKAGE_NAME cdsu-map)
+
+set(CDSUNIT_MAP_SOURCES
+    map_find_int.cpp
+    map_find_int_bronsonavltree.cpp
+    map_find_int_cuckoo.cpp
+    map_find_int_ellentree.cpp
+    map_find_int_michael.cpp
+    map_find_int_skip.cpp
+    map_find_int_split.cpp
+    map_find_int_striped.cpp
+    map_find_int_refinable.cpp
+    map_find_int_std.cpp
+    map_find_string.cpp
+    map_find_string_bronsonavltree.cpp
+    map_find_string_cuckoo.cpp
+    map_find_string_ellentree.cpp
+    map_find_string_michael.cpp
+    map_find_string_skip.cpp
+    map_find_string_split.cpp
+    map_find_string_striped.cpp
+    map_find_string_refinable.cpp
+    map_find_string_std.cpp
+    map_insfind_int.cpp
+    map_insfind_int_bronsonavltree.cpp
+    map_insfind_int_cuckoo.cpp
+    map_insfind_int_ellentree.cpp
+    map_insfind_int_michael.cpp
+    map_insfind_int_skip.cpp
+    map_insfind_int_split.cpp
+    map_insfind_int_striped.cpp
+    map_insfind_int_refinable.cpp
+    map_insfind_int_std.cpp
+    map_insdel_func.cpp
+    map_insdel_func_michael.cpp
+    map_insdel_func_split.cpp
+    map_insdel_func_skip.cpp
+    map_insdel_func_ellentree.cpp
+    map_insdel_func_bronsonavltree.cpp
+    map_insdel_func_striped.cpp
+    map_insdel_func_refinable.cpp
+    map_insdel_func_cuckoo.cpp
+    map_insdel_int.cpp
+    map_insdel_int_michael.cpp
+    map_insdel_int_split.cpp
+    map_insdel_int_skip.cpp
+    map_insdel_int_ellentree.cpp
+    map_insdel_int_bronsonavltree.cpp
+    map_insdel_int_striped.cpp
+    map_insdel_int_refinable.cpp
+    map_insdel_int_cuckoo.cpp
+    map_insdel_item_int.cpp
+    map_insdel_item_int_michael.cpp
+    map_insdel_item_int_split.cpp
+    map_insdel_item_int_skip.cpp
+    map_insdel_item_int_ellentree.cpp
+    map_insdel_item_int_bronsonavltree.cpp
+    map_insdel_item_int_striped.cpp
+    map_insdel_item_int_refinable.cpp
+    map_insdel_item_int_cuckoo.cpp
+    map_insdel_item_string.cpp
+    map_insdel_item_string_michael.cpp
+    map_insdel_item_string_split.cpp
+    map_insdel_item_string_skip.cpp
+    map_insdel_item_string_ellentree.cpp
+    map_insdel_item_string_bronsonavltree.cpp
+    map_insdel_item_string_striped.cpp
+    map_insdel_item_string_refinable.cpp
+    map_insdel_item_string_cuckoo.cpp
+    map_insdel_string.cpp
+    map_insdel_string_michael.cpp
+    map_insdel_string_split.cpp
+    map_insdel_string_skip.cpp
+    map_insdel_string_ellentree.cpp
+    map_insdel_string_bronsonavltree.cpp
+    map_insdel_string_striped.cpp
+    map_insdel_string_refinable.cpp
+    map_insdel_string_cuckoo.cpp
+    map_insdel_string_std.cpp
+    map_insdelfind.cpp
+    map_insdelfind_michael.cpp
+    map_insdelfind_split.cpp
+    map_insdelfind_skip.cpp
+    map_insdelfind_ellentree.cpp
+    map_insdelfind_bronsonavltree.cpp
+    map_insdelfind_striped.cpp
+    map_insdelfind_refinable.cpp
+    map_insdelfind_cuckoo.cpp
+    map_insdelfind_std.cpp
+    map_delodd.cpp
+    map_delodd_michael.cpp
+    map_delodd_bronsonavltree.cpp
+    map_delodd_ellentree.cpp
+    map_delodd_split.cpp
+    map_delodd_skip.cpp
+    map_delodd_cuckoo.cpp
+)
+
+add_executable(${PACKAGE_NAME} ${CDSUNIT_MAP_SOURCES} $<TARGET_OBJECTS:${TEST_COMMON}>)
+target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
+add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME})
\ No newline at end of file
diff --git a/tests/unit/pqueue/CMakeLists.txt b/tests/unit/pqueue/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d89a966
--- /dev/null
@@ -0,0 +1,10 @@
+set(PACKAGE_NAME cdsu-pqueue)
+
+set(CDSUNIT_PQUEUE_SOURCES
+    pop.cpp
+    push.cpp
+    push_pop.cpp)
+
+add_executable(${PACKAGE_NAME} ${CDSUNIT_PQUEUE_SOURCES} $<TARGET_OBJECTS:${TEST_COMMON}>)
+target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
+add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME})
\ No newline at end of file
diff --git a/tests/unit/queue/CMakeLists.txt b/tests/unit/queue/CMakeLists.txt
new file mode 100644 (file)
index 0000000..82eafd2
--- /dev/null
@@ -0,0 +1,12 @@
+set(PACKAGE_NAME cdsu-queue)
+
+set(CDSUNIT_QUEUE_SOURCES
+    queue_pop.cpp
+    queue_push.cpp
+    queue_random.cpp
+    queue_reader_writer.cpp
+    intrusive_queue_reader_writer.cpp)
+
+add_executable(${PACKAGE_NAME} ${CDSUNIT_QUEUE_SOURCES} $<TARGET_OBJECTS:${TEST_COMMON}>)
+target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
+add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME})
\ No newline at end of file
diff --git a/tests/unit/set2/CMakeLists.txt b/tests/unit/set2/CMakeLists.txt
new file mode 100644 (file)
index 0000000..aa26e05
--- /dev/null
@@ -0,0 +1,39 @@
+set(PACKAGE_NAME cdsu-set)
+
+set(CDSUNIT_SET_SOURCES
+    set_insdel_func.cpp
+    set_insdel_func_cuckoo.cpp
+    set_insdel_func_ellentree.cpp
+    set_insdel_func_refinable.cpp
+    set_insdel_func_skip.cpp
+    set_insdel_func_split.cpp
+    set_insdel_func_striped.cpp
+    set_insdel_string.cpp
+    set_insdel_string_michael.cpp
+    set_insdel_string_cuckoo.cpp
+    set_insdel_string_ellentree.cpp
+    set_insdel_string_refinable.cpp
+    set_insdel_string_skip.cpp
+    set_insdel_string_split.cpp
+    set_insdel_string_striped.cpp
+    set_insdel_string_std.cpp
+    set_insdelfind.cpp
+    set_insdelfind_michael.cpp
+    set_insdelfind_cuckoo.cpp
+    set_insdelfind_ellentree.cpp
+    set_insdelfind_refinable.cpp
+    set_insdelfind_skip.cpp
+    set_insdelfind_split.cpp
+    set_insdelfind_striped.cpp
+    set_insdelfind_std.cpp
+    set_delodd.cpp
+    set_delodd_cuckoo.cpp
+    set_delodd_michael.cpp
+    set_delodd_ellentree.cpp
+    set_delodd_skip.cpp
+    set_delodd_split.cpp
+)
+
+add_executable(${PACKAGE_NAME} ${CDSUNIT_SET_SOURCES} $<TARGET_OBJECTS:${TEST_COMMON}>)
+target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
+add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME})
\ No newline at end of file
diff --git a/tests/unit/stack/CMakeLists.txt b/tests/unit/stack/CMakeLists.txt
new file mode 100644 (file)
index 0000000..f521144
--- /dev/null
@@ -0,0 +1,10 @@
+set(PACKAGE_NAME cdsu-stack)
+
+set(CDSUNIT_STACK_SOURCES
+    stack_push.cpp
+    stack_pushpop.cpp
+    stack_intrusive_pushpop.cpp)
+
+add_executable(${PACKAGE_NAME} ${CDSUNIT_STACK_SOURCES} $<TARGET_OBJECTS:${TEST_COMMON}>)
+target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
+add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME})
\ No newline at end of file