-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
74 lines (63 loc) · 2.21 KB
/
Copy pathCMakeLists.txt
File metadata and controls
74 lines (63 loc) · 2.21 KB
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
cmake_minimum_required(VERSION 3.8)
set(CMAKE_CXX_STANDARD 14)
SET(GTEST_LATEST false CACHE BOOL "Download latest gtest from github or local gtest zip")
SET(ENABLE_COVERAGE false CACHE BOOL "Enable test coverage with GCC or clang")
if (${GTEST_LATEST})
# Download and unpack googletest at configure time
configure_file(CMakeLists.txt.in
googletest-download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download )
execute_process(COMMAND ${CMAKE_COMMAND} --build .
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download )
# Prevent GoogleTest from overriding our compiler/linker options
# when building with Visual Studio
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
# Add googletest directly to our build. This adds
# the following targets: gtest, gtest_main, gmock
# and gmock_main
add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src
${CMAKE_BINARY_DIR}/googletest-build)
enable_testing()
else()
set(GTEST googletest-release-1.8.1)
include_directories(./include
${GTEST}/googletest/include/
${GTEST}/googlemock/include)
link_directories(build/gtest/googlemock/gtest/
build/gtest/googlemock/)
endif ()
if (${ENABLE_COVERAGE})
add_compile_options(-g -O0 -fprofile-arcs -ftest-coverage)
endif ()
project(scuttlebutt-cpp)
include_directories(
include
pull-looper
pull-stream
pull-split
pull-through
pull-stringify
duplex-pull
event-emitter
event-loop
monotonic-timestamp
scuttlebutt-pull
duplex-stream
duplex-stream-to-pull
circular-buffer
)
add_subdirectory(pull-looper)
add_subdirectory(pull-stream)
add_subdirectory(pull-through)
add_subdirectory(pull-split)
add_subdirectory(duplex-pull)
add_subdirectory(event-emitter)
add_subdirectory(event-loop)
add_subdirectory(monotonic-timestamp)
add_subdirectory(scuttlebutt-pull)
add_subdirectory(duplex-stream)
add_subdirectory(duplex-stream-to-pull)
add_subdirectory(pull-stringify)
add_subdirectory(circular-buffer)
add_subdirectory(socket-stream)