-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
64 lines (48 loc) · 1.95 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
60
61
62
63
# -*-Mode: cmake;-*-
#*BeginPNNLCopyright*********************************************************
#
# $HeadURL$
# $Id$
#
#***********************************************************EndPNNLCopyright*
#****************************************************************************
#
#****************************************************************************
cmake_minimum_required(VERSION 2.8...3.27)
project(DataLife VERSION 0.1.0)
#****************************************************************************
# Options
#****************************************************************************
option(ENABLE_FlowMonitor "Enable build of DataLife-FlowMonitor" ON)
option(ENABLE_FlowAnalysis "Enable build of DataLife-FlowAnalysis" ON)
option(ENABLE_TESTS "Build test programs" OFF)
# Compiling Mode
# Set a default build type if none was specified
set(default_build_type "Release")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message("IN DEBUG MODE")
add_compile_options(-g -O0)
add_compile_definitions(LIBDEBUG)
else()
message("IN RELEASE MODE")
add_compile_options(-g -O3)
endif()
#****************************************************************************
#
#****************************************************************************
set(DATALIFE_ROOT ${CMAKE_BINARY_DIR})
message(STATUS "DATALIFE_ROOT=${DATALIFE_ROOT}")
if(ENABLE_FlowMonitor)
add_subdirectory(flow-monitor)
endif(ENABLE_FlowMonitor)
if(ENABLE_FlowAnalysis)
add_subdirectory(flow-analysis)
endif(ENABLE_FlowAnalysis)
#****************************************************************************
# install datalife-run
#add_executable(datalife-run flow-monitor/datalife-run)
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
# if(ENABLE_FlowMonitor) endif(ENABLE_FlowMonitor)
configure_file(flow-monitor/datalife-run ${CMAKE_BINARY_DIR}/bin COPYONLY)
#if(ENABLE_FlowAnalysis) endif(ENABLE_FlowAnalysis)
configure_file(flow-analysis/datalife-analyze ${CMAKE_BINARY_DIR}/bin COPYONLY)