-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (42 loc) · 1.6 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
cmake_minimum_required(VERSION 2.8)
project(singularuty.modeling)
option(WITH_BITCOIN "Use bitcoin" OFF)
if (WITH_BITCOIN)
add_definitions(-DUSE_BITCOIN)
endif()
list(APPEND BOOST_COMPONENTS thread
date_time
filesystem
system
chrono
program_options
unit_test_framework
serialization
)
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
endif()
add_subdirectory( libraries/singularity/ )
file(GLOB HEADERS "include/*.hpp")
set(SOURCE_EXE ${SOURCE_EXE} providers.cpp)
if (WITH_BITCOIN)
set(SOURCE_EXE ${SOURCE_EXE} bitcoinexplorer.cpp bitcoin_provider.cpp)
endif()
if ( APPLE )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -stdlib=libc++ -Wall -fpermissive" )
else ( APPLE )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -Wall -fpermissive" )
endif ( APPLE )
include_directories( include )
add_executable( example programs/example.cpp ${HEADERS} ${SOURCE_EXE} )
add_executable( stress_test programs/stress_test.cpp ${HEADERS} ${SOURCE_EXE} )
if (WITH_BITCOIN)
target_link_libraries( example singularity boost_system bitcoin)
target_link_libraries( stress_test singularity boost_system bitcoin)
else ()
target_link_libraries( example singularity boost_system)
target_link_libraries( stress_test singularity boost_system)
endif ()
add_subdirectory( tests )
enable_testing ()