-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
46 lines (37 loc) · 871 Bytes
/
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
cmake_minimum_required(VERSION 3.0)
project(libab)
SET(CMAKE_C_FLAGS "-fPIC -march=native")
SET(CMAKE_CXX_FLAGS "-std=c++14 -fPIC -march=native")
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
include_directories(
src
include
dep
dep/libuv/include
)
set(BUILD_TESTING OFF)
add_subdirectory(dep/libuv EXCLUDE_FROM_ALL)
add_executable(main
src/main.cc
)
add_executable(abtest
test/catch.cc
test/role.cc
)
add_library(ab SHARED
src/message/message.cc
src/message/randombytes.cc
src/peer/peer.cc
src/node/node.cc
src/node/role.cc
src/c.cc
dep/tweetnacl/tweetnacl.c
)
target_link_libraries(ab uv_a)
target_link_libraries(main ab)
target_link_libraries(abtest ab)
install(TARGETS ab DESTINATION lib)
install(FILES include/ab.h DESTINATION include)
add_test(NAME abtest COMMAND abtest)
enable_testing(true)