-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathCMakeLists.txt
43 lines (28 loc) · 1.05 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
cmake_minimum_required(VERSION 3.10)
project(shadesmar)
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG_BUILD")
find_package(benchmark REQUIRED)
set(CMAKE_CXX_STANDARD 14)
include_directories(include)
list(APPEND libs rt pthread stdc++fs)
add_compile_options(-march=native)
IF(SINGLE_H)
add_definitions(-DSINGLE_HEADER)
ENDIF(SINGLE_H)
# TESTS
add_executable(pubsub_test test/pubsub_test.cpp)
target_link_libraries(pubsub_test ${libs})
add_executable(rpc_test test/rpc_test.cpp)
target_link_libraries(rpc_test ${libs})
add_executable(dragons_test test/dragons_test.cpp)
target_link_libraries(dragons_test ${libs})
add_executable(allocator_test test/allocator_test.cpp)
target_link_libraries(allocator_test ${libs})
# BENCHMARKS
add_executable(dragons_bench benchmark/dragons.cpp)
target_link_libraries(dragons_bench ${libs} benchmark::benchmark)
add_executable(pubsub_bench benchmark/pubsub.cpp)
target_link_libraries(pubsub_bench ${libs})
add_executable(rpc_bench benchmark/rpc.cpp)
target_link_libraries(rpc_bench ${libs})