forked from fblumenthal/buildem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mlpack.cmake
50 lines (37 loc) · 1.27 KB
/
mlpack.cmake
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
#
# Install mlpack from source
#
if (NOT mlpack_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
include (PatchSupport)
include (armadillo)
include (boost)
include (libxml2)
external_source (mlpack
1.0.8
mlpack-1.0.8.tar.gz
0331e12f2485b9d5d39c9d9dea618108
http://www.mlpack.org/files
"FORCE")
message ("Installing ${mlpack_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${mlpack_NAME}
DEPENDS ${armadillo_NAME} ${boost_NAME} ${libxml2_NAME}
PREFIX ${BUILDEM_DIR}
URL ${mlpack_URL}
URL_MD5 ${mlpack_MD5}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${mlpack_SRC_DIR}
-DBUILD_SHARED_LIBS=ON
-DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS}
-DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR}
-DCMAKE_PREFIX_PATH=${BUILDEM_DIR}
-DLIBXML2_INCLUDE_DIR=${BUILDEM_DIR}/include/libxml2
BUILD_COMMAND ${BUILDEM_ENV_STRING} make
INSTALL_COMMAND ${BUILDEM_ENV_STRING} make install
# TEST_COMMAND ${BUILDEM_ENV_STRING} make test
)
set_target_properties(${mlpack_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT mlpack_NAME)