Adds parallel test organization (actual test cases are still sequential)
[libcds.git] / test / stress / queue / CMakeLists.txt
1 include_directories(
2     ${CMAKE_CURRENT_SOURCE_DIR}
3 )
4
5 # stress-queue-pop
6 set(CDSSTRESS_QUEUE_POP stress-queue-pop)
7 set(CDSSTRESS_QUEUE_POP_SOURCES
8     ../main.cpp
9     pop.cpp
10 )
11 add_executable(${CDSSTRESS_QUEUE_POP} ${CDSSTRESS_QUEUE_POP_SOURCES})
12 target_link_libraries(${CDSSTRESS_QUEUE_POP} ${CDS_TEST_LIBRARIES} ${CDSSTRESS_FRAMEWORK_LIBRARY})
13 add_test(NAME ${CDSSTRESS_QUEUE_POP} COMMAND ${CDSSTRESS_QUEUE_POP} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})    
14
15 # stress-queue-push
16 set(CDSSTRESS_QUEUE_PUSH stress-queue-push)
17 set(CDSSTRESS_QUEUE_PUSH_SOURCES
18     ../main.cpp
19     push.cpp
20 )
21 add_executable(${CDSSTRESS_QUEUE_PUSH} ${CDSSTRESS_QUEUE_PUSH_SOURCES})
22 target_link_libraries(${CDSSTRESS_QUEUE_PUSH} ${CDS_TEST_LIBRARIES} ${CDSSTRESS_FRAMEWORK_LIBRARY})
23 add_test(NAME ${CDSSTRESS_QUEUE_PUSH} COMMAND ${CDSSTRESS_QUEUE_PUSH} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})    
24
25 # stress-queue-push-pop
26 set(CDSSTRESS_QUEUE_PUSHPOP stress-queue-push-pop)
27 set(CDSSTRESS_QUEUE_PUSHPOP_SOURCES
28     ../main.cpp
29     push_pop.cpp
30     #intrusive_push_pop.cpp    
31 )
32 add_executable(${CDSSTRESS_QUEUE_PUSHPOP} ${CDSSTRESS_QUEUE_PUSHPOP_SOURCES})
33 target_link_libraries(${CDSSTRESS_QUEUE_PUSHPOP} ${CDS_TEST_LIBRARIES} ${CDSSTRESS_FRAMEWORK_LIBRARY})
34 add_test(NAME ${CDSSTRESS_QUEUE_PUSHPOP} COMMAND ${CDSSTRESS_QUEUE_PUSHPOP} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})    
35
36 # stress-queue-random
37 set(CDSSTRESS_QUEUE_RANDOM stress-queue-random)
38 set(CDSSTRESS_QUEUE_RANDOM_SOURCES
39     ../main.cpp
40     random.cpp
41 )
42 add_executable(${CDSSTRESS_QUEUE_RANDOM} ${CDSSTRESS_QUEUE_RANDOM_SOURCES})
43 target_link_libraries(${CDSSTRESS_QUEUE_RANDOM} ${CDS_TEST_LIBRARIES} ${CDSSTRESS_FRAMEWORK_LIBRARY})
44 add_test(NAME ${CDSSTRESS_QUEUE_RANDOM} COMMAND ${CDSSTRESS_QUEUE_RANDOM} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})    
45
46 # stress-queue-bounded
47 set(CDSSTRESS_QUEUE_BOUNDED stress-queue-bounded)
48 set(CDSSTRESS_QUEUE_BOUNDED_SOURCES
49     ../main.cpp
50     bounded_queue_fulness.cpp
51 )
52 add_executable(${CDSSTRESS_QUEUE_BOUNDED} ${CDSSTRESS_QUEUE_BOUNDED_SOURCES})
53 target_link_libraries(${CDSSTRESS_QUEUE_BOUNDED} ${CDS_TEST_LIBRARIES} ${CDSSTRESS_FRAMEWORK_LIBRARY})
54 add_test(NAME ${CDSSTRESS_QUEUE_BOUNDED} COMMAND ${CDSSTRESS_QUEUE_BOUNDED} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})    
55
56 # stress-spsc-queue
57 set(CDSSTRESS_SPSC_QUEUE stress-spsc-queue)
58 set(CDSSTRESS_SPSC_QUEUE_SOURCES
59     ../main.cpp
60     spsc_queue.cpp
61     spsc_buffer.cpp
62 )
63 add_executable(${CDSSTRESS_SPSC_QUEUE} ${CDSSTRESS_SPSC_QUEUE_SOURCES})
64 target_link_libraries(${CDSSTRESS_SPSC_QUEUE} ${CDS_TEST_LIBRARIES} ${CDSSTRESS_FRAMEWORK_LIBRARY})
65 add_test(NAME ${CDSSTRESS_SPSC_QUEUE} COMMAND ${CDSSTRESS_SPSC_QUEUE} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
66
67
68 # stress-queue
69 add_custom_target( stress-queue
70     DEPENDS
71         ${CDSSTRESS_QUEUE_POP}
72         ${CDSSTRESS_QUEUE_PUSH}
73         ${CDSSTRESS_QUEUE_PUSHPOP}
74         ${CDSSTRESS_QUEUE_RANDOM}
75         ${CDSSTRESS_QUEUE_BOUNDED}
76         ${CDSSTRESS_SPSC_QUEUE}
77 )