forked from hyperledger-iroha/iroha-dco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (32 loc) · 973 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
cmake_minimum_required(VERSION 2.8)
PROJECT(iroha C CXX)
SET(CMAKE_CXX_FLAGS "-g -std=c++1y -Wall -fPIC")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
SET(CMAKE_CXX_FLAGS_DEBUG "-Wextra -Wno-unused-parameter -O0")
#SET(CMAKE_SHARED_LINKER_FLAGS "-lpthread -lssl")
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
option(BENCHMARKING "Build benchmarks" OFF)
option(TESTING "Build tests" ON)
# set default CMAKE_BUILD_TYPE=Debug
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
message(STATUS "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
message(STATUS "-DTESTING=${TESTING}")
message(STATUS "-DBENCHMARKING=${BENCHMARKING}")
include_directories(
${PROJECT_SOURCE_DIR}/core
${PROJECT_SOURCE_DIR}/include
)
include("dependencies.cmake")
add_subdirectory(flatbuffers)
add_subdirectory(core)
add_subdirectory(peer)
add_subdirectory(tools)
if(TESTING)
enable_testing()
add_subdirectory(test)
endif()
if(BENCHMARKING)
add_subdirectory(benchmark)
endif()