-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
47 lines (36 loc) · 1.1 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
cmake_minimum_required(VERSION 2.8)
#set the project name
#project(MasterElection VERSION 1.0)
project(DUUF)
#specify the C++ Standard
#set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "-std=c++11" ${CMAKE_CXX_FLAGS})
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES /usr/local/lib ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
set(PROJECT_DIR ${PROJECT_SOURCE_DIR})
set(COMF_DIR ${PROJECT_DIR}/COMF)
option(CODE_COVERAGE "Enable coverage reporting" OFF)
if(CODE_COVERAGE)
add_compile_options(
-O0 #no optimization
-g #generate debug info
--coverage #set coverage flag
-fprofile-arcs
-ftest-coverage
)
link_libraries(
"gcov"
"-fprofile-arcs"
"--coverage"
)
endif(CODE_COVERAGE)
add_subdirectory(COMF)
option(TEST_SET "Enable test compilation" OFF)
if(TEST_SET)
add_subdirectory(TESTS)
endif(TEST_SET)
#add the executable
#add_executable(MasterElection main.cpp)
#target_link_libraries(MasterElection udp)
#add_library(udp SHARED udp_base.cpp udp_client.cpp udp_server.cpp)
#target_include_directories(MasterElection PUBLIC "${COMF_DIR}" "${COMF_DIR}/udp_client_server")