Changed target name
[libcds.git] / test / unit / set / CMakeLists.txt
index 9f9616a24ca1055cb5d532b3838bb2cea9a94981..0487d66170c5bb98e46a3891d2dda77b66ae0273 100644 (file)
-set(PACKAGE_NAME unit-set)
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof")
-
-set(CDSGTEST_SET_SOURCES
-    ../main.cpp
-    intrusive_michael_lazy_hp.cpp
-    intrusive_michael_lazy_dhp.cpp
-    intrusive_michael_lazy_nogc.cpp
-    intrusive_michael_lazy_rcu_gpb.cpp
-    intrusive_michael_lazy_rcu_gpi.cpp
-    intrusive_michael_lazy_rcu_gpt.cpp
-    intrusive_michael_lazy_rcu_shb.cpp
-    intrusive_michael_lazy_rcu_sht.cpp
-    intrusive_michael_michael_hp.cpp
-    intrusive_michael_michael_dhp.cpp
-    intrusive_michael_michael_nogc.cpp
-    intrusive_michael_michael_rcu_gpb.cpp
-    intrusive_michael_michael_rcu_gpi.cpp
-    intrusive_michael_michael_rcu_gpt.cpp
-    intrusive_michael_michael_rcu_shb.cpp
-    intrusive_michael_michael_rcu_sht.cpp
-    intrusive_split_lazy_hp.cpp
-    intrusive_split_lazy_dhp.cpp
-    intrusive_split_lazy_nogc.cpp
-    intrusive_split_lazy_rcu_gpb.cpp
-    intrusive_split_lazy_rcu_gpi.cpp
-    intrusive_split_lazy_rcu_gpt.cpp
-    intrusive_split_lazy_rcu_shb.cpp
-    intrusive_split_lazy_rcu_sht.cpp
-    intrusive_split_michael_hp.cpp
-    intrusive_split_michael_dhp.cpp
-    intrusive_split_michael_nogc.cpp
-    intrusive_split_michael_rcu_gpb.cpp
-    intrusive_split_michael_rcu_gpi.cpp
-    intrusive_split_michael_rcu_gpt.cpp
-    intrusive_split_michael_rcu_shb.cpp
-    intrusive_split_michael_rcu_sht.cpp
-)
-
 include_directories(
     ${CMAKE_CURRENT_SOURCE_DIR}
 )
 
-add_executable(${PACKAGE_NAME} ${CDSGTEST_SET_SOURCES})
-target_link_libraries(${PACKAGE_NAME} 
-    ${CDS_SHARED_LIBRARY}
-    ${GTEST_LIBRARY}
-    ${Boost_THREAD_LIBRARY}
-    ${Boost_SYSTEM_LIBRARY}
-    ${CMAKE_THREAD_LIBS_INIT}
+# FeldmanHashSet
+set(UNIT_SET_FELDMAN unit-set-feldman)
+set(UNIT_SET_FELDMAN_SOURCES
+    ../main.cpp
+    feldman_hashset_hp.cpp
+    feldman_hashset_dhp.cpp
+    feldman_hashset_rcu_gpb.cpp
+    feldman_hashset_rcu_gpi.cpp
+    feldman_hashset_rcu_gpt.cpp
+    feldman_hashset_rcu_shb.cpp
+)
+add_executable(${UNIT_SET_FELDMAN} ${UNIT_SET_FELDMAN_SOURCES})
+target_link_libraries(${UNIT_SET_FELDMAN} ${CDS_TEST_LIBRARIES})
+
+add_test(NAME ${UNIT_SET_FELDMAN} COMMAND ${UNIT_SET_FELDMAN} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+
+# MichaelSet<MichaelList>
+set(UNIT_SET_MICHAEL unit-set-michael-michael)
+set(UNIT_SET_MICHAEL_SOURCES
+    ../main.cpp
+    michael_michael_hp.cpp
+    michael_michael_dhp.cpp
+    michael_michael_nogc.cpp
+    michael_michael_rcu_gpb.cpp
+    michael_michael_rcu_gpi.cpp
+    michael_michael_rcu_gpt.cpp
+    michael_michael_rcu_shb.cpp
+)
+add_executable(${UNIT_SET_MICHAEL} ${UNIT_SET_MICHAEL_SOURCES})
+target_link_libraries(${UNIT_SET_MICHAEL} ${CDS_TEST_LIBRARIES})
+add_test(NAME ${UNIT_SET_MICHAEL} COMMAND ${UNIT_SET_MICHAEL} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+
+# MichaelSet<IterableList>
+set(UNIT_SET_MICHAEL_ITERABLE unit-set-michael-iterable)
+set(UNIT_SET_MICHAEL_ITERABLE_SOURCES
+    ../main.cpp
+    michael_iterable_hp.cpp
+    michael_iterable_dhp.cpp
 )
+add_executable(${UNIT_SET_MICHAEL_ITERABLE} ${UNIT_SET_MICHAEL_ITERABLE_SOURCES})
+target_link_libraries(${UNIT_SET_MICHAEL_ITERABLE} ${CDS_TEST_LIBRARIES})
+add_test(NAME ${UNIT_SET_MICHAEL_ITERABLE} COMMAND ${UNIT_SET_MICHAEL_ITERABLE} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
 
-add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
\ No newline at end of file
+# MichaelSet<LazyList>
+set(UNIT_SET_MICHAEL_LAZY unit-set-michael-lazy)
+set(UNIT_SET_MICHAEL_LAZY_SOURCES
+    ../main.cpp
+    michael_lazy_hp.cpp
+    michael_lazy_dhp.cpp
+    michael_lazy_nogc.cpp
+    michael_lazy_rcu_gpb.cpp
+    michael_lazy_rcu_gpi.cpp
+    michael_lazy_rcu_gpt.cpp
+    michael_lazy_rcu_shb.cpp
+)
+add_executable(${UNIT_SET_MICHAEL_LAZY} ${UNIT_SET_MICHAEL_LAZY_SOURCES})
+target_link_libraries(${UNIT_SET_MICHAEL_LAZY} ${CDS_TEST_LIBRARIES})
+add_test(NAME ${UNIT_SET_MICHAEL_LAZY} COMMAND ${UNIT_SET_MICHAEL_LAZY} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+
+# SkipListSet
+set(UNIT_SET_SKIP unit-set-skip)
+set(UNIT_SET_SKIP_SOURCES
+    ../main.cpp
+    skiplist_hp.cpp
+    skiplist_dhp.cpp
+    skiplist_nogc.cpp
+    skiplist_rcu_gpb.cpp
+    skiplist_rcu_gpi.cpp
+    skiplist_rcu_gpt.cpp
+    skiplist_rcu_shb.cpp
+)
+add_executable(${UNIT_SET_SKIP} ${UNIT_SET_SKIP_SOURCES})
+target_link_libraries(${UNIT_SET_SKIP} ${CDS_TEST_LIBRARIES})
+add_test(NAME ${UNIT_SET_SKIP} COMMAND ${UNIT_SET_SKIP} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+
+# SplitListSet<MichaelList>
+set(UNIT_SET_SPLIT_MICHAEL unit-set-split-michael)
+set(UNIT_SET_SPLIT_MICHAEL_SOURCES
+    ../main.cpp
+    split_michael_hp.cpp
+    split_michael_dhp.cpp
+    split_michael_nogc.cpp
+    split_michael_rcu_gpb.cpp
+    split_michael_rcu_gpi.cpp
+    split_michael_rcu_gpt.cpp
+    split_michael_rcu_shb.cpp
+)
+add_executable(${UNIT_SET_SPLIT_MICHAEL} ${UNIT_SET_SPLIT_MICHAEL_SOURCES})
+target_link_libraries(${UNIT_SET_SPLIT_MICHAEL} ${CDS_TEST_LIBRARIES})
+add_test(NAME ${UNIT_SET_SPLIT_MICHAEL} COMMAND ${UNIT_SET_SPLIT_MICHAEL} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+
+# SplitListSet<LazyList>
+set(UNIT_SET_SPLIT_LAZY unit-set-split-lazy)
+set(UNIT_SET_SPLIT_LAZY_SOURCES
+    ../main.cpp
+    split_lazy_hp.cpp
+    split_lazy_dhp.cpp
+    split_lazy_nogc.cpp
+    split_lazy_rcu_gpb.cpp
+    split_lazy_rcu_gpi.cpp
+    split_lazy_rcu_gpt.cpp
+    split_lazy_rcu_shb.cpp
+)
+add_executable(${UNIT_SET_SPLIT_LAZY} ${UNIT_SET_SPLIT_LAZY_SOURCES})
+target_link_libraries(${UNIT_SET_SPLIT_LAZY} ${CDS_TEST_LIBRARIES})
+add_test(NAME ${UNIT_SET_SPLIT_LAZY} COMMAND ${UNIT_SET_SPLIT_LAZY} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+
+# SplitListSet<IterableList>
+set(UNIT_SET_SPLIT_ITERABLE unit-set-split-iterable)
+set(UNIT_SET_SPLIT_ITERABLE_SOURCES
+    ../main.cpp
+    split_iterable_hp.cpp
+    split_iterable_dhp.cpp
+)
+add_executable(${UNIT_SET_SPLIT_ITERABLE} ${UNIT_SET_SPLIT_ITERABLE_SOURCES})
+target_link_libraries(${UNIT_SET_SPLIT_ITERABLE} ${CDS_TEST_LIBRARIES})
+add_test(NAME ${UNIT_SET_SPLIT_ITERABLE} COMMAND ${UNIT_SET_SPLIT_ITERABLE} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+
+
+add_custom_target( unit-set
+    DEPENDS
+        ${UNIT_SET_FELDMAN}
+        ${UNIT_SET_MICHAEL}
+        ${UNIT_SET_MICHAEL_ITERABLE}
+        ${UNIT_SET_MICHAEL_LAZY}
+        ${UNIT_SET_SKIP}
+        ${UNIT_SET_SPLIT_MICHAEL}
+        ${UNIT_SET_SPLIT_ITERABLE}
+        ${UNIT_SET_SPLIT_LAZY}
+)