-
Notifications
You must be signed in to change notification settings - Fork 31
/
CMakeLists.txt
133 lines (124 loc) · 4.76 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# To build the whole paralgo project, you can type the following shell
# commands:
#
# $> mkdir build
# $> cd build
# $> cmake ..
# $> make
#
# Thus you check out the paralgo project and build it in a
# subdirectory ``build''. If you want further to install the built
# project, you can modify the default installation directory:
#
# set(CMAKE_INSTALL_PREFIX "/home/public/paralgo")
#
# and type the command
#
# $> make install
#
# If you want to use distcc for a distributed build, substitute above
# command
# cmake ../paralgo
# by
# CC=distcc cmake ../paralgo
#
project ("paralgo")
cmake_minimum_required(VERSION 2.8) # Requires 2.8 for protobuf support.
#------------------------------------------------------------------------------
# Add protobuf compilation support
#------------------------------------------------------------------------------
include("FindProtobuf")
find_package(Protobuf REQUIRED)
#------------------------------------------------------------------------------
# Take almost all warnining;
# Take warnings as errors;
# Do not generate debug symbols;
# Optimization level 2;
#------------------------------------------------------------------------------
add_definitions(" -Wall -Wno-sign-compare -Werror -O2 ")
#------------------------------------------------------------------------------
# Declare where our project will be installed.
#------------------------------------------------------------------------------
set(CMAKE_INSTALL_PREFIX "/home/public/paralgo")
#------------------------------------------------------------------------------
# The following flags ensure that executables are statically linked
# with libraries. This makes it easy to deploy your executable across
# a computer cluster. However, MacOS X does not support these flags,
# so you might want to comment them out if you develop on MacOS X.
# ------------------------------------------------------------------------------
# set(CMAKE_EXE_LINKER_FLAGS "-static -static-libgcc")
#------------------------------------------------------------------------------
# Declare where the third party libraries were installed.
#
# If you are building on and for Linux, it is recommended to install
# all the following dependents by yourself, using --enable-static and
# --disabel-shared flags with the configure script. This ensures that
# your binary links statistically with all dependents and is the only
# file you need to deploy.
#
# MRML-lasso depends on the following thridparty pacakges:
#
# - protobuf
# - boost
# - gflags
# - openssl
# - libssh2
# - mpich2
#
# However, if you are building on MacOS X. It would be much easier to
# install above package using Homebrew, and you will find all headers
# files at /usr/local/include and all libraries in /usr/local/lib.
# ------------------------------------------------------------------------------
# set(THIRD_PARTY_DIR "${PROJECT_SOURCE_DIR}/../thirdparty")
# set(PROTOBUF_DIR "${THIRD_PARTY_DIR}/protobuf")
# set(BOOST_DIR "${THIRD_PARTY_DIR}/boost")
# set(GFLAGS_DIR "${THIRD_PARTY_DIR}/gflags")
# set(MPICH2_DIR "${THIRD_PARTY_DIR}/mpich")
# set(OPENSSL_DIR "${THIRD_PARTY_DIR}/openssl")
# set(LIBSSH2_DIR "${THIRD_PARTY_DIR}/libssh2")
#------------------------------------------------------------------------------
# Set include paths.
# Add new lines below if you installed more 3rd-party libs.
#------------------------------------------------------------------------------
include_directories(
"${PROJECT_SOURCE_DIR}"
"${PROJECT_BINARY_DIR}"
"${PROJECT_SOURCE_DIR}/gtest/include"
# "${PROTOBUF_DIR}/include";
# "${MPICH2_DIR}/include";
# "${OPENSSL_DIR}/include";
# "${LIBSSH2_DIR}/include";
# "${BOOST_DIR}";
# "${GFLAGS_DIR}/include";
"/usr/local/include"
)
#------------------------------------------------------------------------------
# Set libray paths.
# Add new lines below if you add new packages in paralgo project, or installed
# more 3rd-party libs.
#------------------------------------------------------------------------------
link_directories(
"${PROJECT_BINARY_DIR}/base"
"${PROJECT_BINARY_DIR}/strutil"
"${PROJECT_BINARY_DIR}/hash"
"${PROJECT_BINARY_DIR}/sorted_buffer"
"${PROJECT_BINARY_DIR}/mrml"
# "${PROTOBUF_DIR}/lib";
# "${MPICH2_DIR}/lib";
# "${OPENSSL_DIR}/lib";
# "${LIBSSH2_DIR}/lib";
# "${BOOST_DIR}/stage/lib";
# "${GFLAGS_DIR}/lib";
"/usr/local/lib"
)
#------------------------------------------------------------------------------
# Declare packages in paralgo project.
# Add new lines below if you add new packages in paralgo project.
#------------------------------------------------------------------------------
add_subdirectory(gtest)
add_subdirectory(base)
add_subdirectory(strutil)
add_subdirectory(hash)
add_subdirectory(sorted_buffer)
add_subdirectory(mrml)
add_subdirectory(mrml-lasso)