-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
83 lines (72 loc) · 2.03 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(RingBufferBenchmark)
find_package(benchmark CONFIG REQUIRED)
find_package(folly CONFIG REQUIRED)
add_executable(RingBufferBenchmark
DummyContainer.hpp
Platform.hpp
BenchmarkSupport.hpp
RingBufferBenchmark.cpp
aligned_alloc.hpp
compile_time_utilities.hpp
scope_guard.hpp
spsc_queue.hpp
spsc_queue_release.hpp
spsc_ring_buffer.hpp
spsc_ring_buffer_cached.hpp
spsc_ring_buffer_chunked.hpp
spsc_ring_buffer_heap.hpp
ce_queue.hpp
LamportQueue1.hpp
LamportQueue2.hpp
LamportQueue3.hpp
LamportQueue4.hpp
LamportQueue5.hpp
LamportQueue6.hpp
LamportQueue7.hpp
LamportQueue8.hpp
LamportQueue9.hpp
LamportQueueTest.cpp
FastForward1.hpp
FastForward2.hpp
FastForward3.hpp
FastForward4.hpp
FastForward5.hpp
FastForward6.hpp
FastForwardTest.cpp
MCRingBuffer1.hpp
MCRingBuffer2.hpp
MCRingBuffer3.hpp
MCRingBuffer4.hpp
MCRingBuffer5.hpp
MCRingBuffer6.hpp
MCRingBuffer7.hpp
MCRingBufferTest.cpp
GFFQueue1.hpp
GFFQueue2.hpp
GFFQueue3.hpp
GFFQueue4.hpp
GFFQueue5.hpp
GFFQueueTest.cpp
ChunkedQueue1.hpp
ChunkedQueue2.hpp
ChunkedQueue3.hpp
ChunkedQueue4.hpp
ChunkedQueue5.hpp
ChunkedQueue6.hpp
ChunkedQueue7.hpp
ChunkedQueueTest.cpp
mpmc_queue.hpp
)
set_property(TARGET RingBufferBenchmark PROPERTY CXX_STANDARD 17)
target_link_libraries(RingBufferBenchmark benchmark::benchmark Folly::folly Folly::folly_deps)
target_compile_options(RingBufferBenchmark PRIVATE -DMOODYCAMEL_CACHE_LINE_SIZE=128)
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
target_compile_options(RingBufferBenchmark PRIVATE "-mavx")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(RingBufferBenchmark PRIVATE "-mavx")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
target_compile_options(RingBufferBenchmark PRIVATE "/arch:AVX" PRIVATE "/bigobj")
else()
message(ERROR "Unknown compiler")
endif()