-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
46 lines (36 loc) · 2 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
cmake_minimum_required(VERSION 2.8)
project(SPN_EM)
# Compiler flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3")
## Executables for batch learning algorithms
set(SOURCE_FILES_BATCH batch_learning.cpp src/SPNNode.cpp src/SPNNode.h src/utils.h src/utils.cpp
src/SPNetwork.cpp src/SPNetwork.h src/fmath.hpp src/BatchParamLearning.cpp src/BatchParamLearning.h)
## Executables for online learning algorithms
set(SOURCE_FILES_ONLINE online_learning.cpp src/SPNNode.cpp src/SPNNode.h src/utils.h src/utils.cpp
src/SPNetwork.cpp src/SPNetwork.h src/fmath.hpp src/OnlineParamLearning.cpp src/OnlineParamLearning.h)
## Executable for streaming learning algorithms
set(SOURCE_FILES_STREAM stream_learning.cpp src/SPNNode.cpp src/SPNNode.h src/utils.h src/utils.cpp
src/SPNetwork.cpp src/SPNetwork.h src/fmath.hpp src/StreamParamLearning.cpp src/StreamParamLearning.h)
## Executable for structure learning algorithms
set(SOURCE_FILES_STRUCTURE st_learn.cpp src/SPNNode.cpp src/SPNNode.h src/utils.h src/utils.cpp
src/SPNetwork.cpp src/SPNetwork.h src/StructureLearning.cpp src/StructureLearning.h
src/BatchParamLearning.cpp src/BatchParamLearning.h)
# BOOST support
find_package(Boost 1.55.0 COMPONENTS system filesystem thread program_options REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "/Users/hanzhao/ClionProjects/SPN-EM/")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "/YOUR/RUNTIME/DIRECTORY")
# Online learning
add_executable(online_learning ${SOURCE_FILES_ONLINE})
# Batch learning
add_executable(batch_learning ${SOURCE_FILES_BATCH})
# Stream learning
add_executable(stream_learning ${SOURCE_FILES_STREAM})
# Structure learning
add_executable(st_learn ${SOURCE_FILES_STRUCTURE})
# Link libs
target_link_libraries(online_learning ${Boost_LIBRARIES})
target_link_libraries(batch_learning ${Boost_LIBRARIES})
target_link_libraries(stream_learning ${Boost_LIBRARIES})
target_link_libraries(st_learn ${Boost_LIBRARIES})