forked from jni/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
70 lines (57 loc) · 2.47 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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
project (ray)
include (ExternalProject)
set (RUN_ENVIRONMENT "Workstation" CACHE TYPE STRING)
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release)
endif ()
################################################################################
# Check if FLYEM_BUILD_DIR has already been assigned. If not, create a default.
set (FLYEM_BUILD_DIR "None" CACHE TYPE STRING)
if (${FLYEM_BUILD_DIR} STREQUAL "None")
message (FATAL_ERROR "ERROR: FlyEM build directory (for all downloads & builds) should be specified via -DFLYEM_BUILD_DIR=<path> on cmake command line.")
endif ()
message ("FlyEM downloads and builds will be placed here: ${FLYEM_BUILD_DIR}")
###############################################################################
###############################################################################
# Download and install flyem-build, if it isn't already in FLYEM_BUILD_DIR.
set (FLYEM_BUILD_REPO_DIR ${FLYEM_BUILD_DIR}/src/flyem-build)
if (NOT EXISTS ${FLYEM_BUILD_REPO_DIR}/python.cmake)
message ("Installing flyem-build repo...")
ExternalProject_Add(flyem-build
PREFIX ${FLYEM_BUILD_DIR}
GIT_REPOSITORY http://github.com/janelia-flyem/flyem-build.git
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
BUILD_IN_SOURCE 1
INSTALL_COMMAND ""
)
message ("\n**********************************************************\n")
message ("\nAfter running make, you must re-run the cmake command once")
message ("flyem-build has been downloaded!\n")
message ("\n***********************************************************\n")
else ()
###############################################################################
# Use modules from the downloaded flyem-build
set (CMAKE_MODULE_PATH ${FLYEM_BUILD_REPO_DIR})
message("Using cmake modules from ${FLYEM_BUILD_REPO_DIR}")
# Download and compile dependencies
include (cython)
include (numpy)
include (scipy)
include (h5py)
include (pil)
include (vigra)
include (networkx)
include (progressbar)
include (matplotlib)
include (scikit-image)
include (scikit-learn)
# Install ray
add_custom_target (ray ALL
DEPENDS ${APP_DEPENDENCIES}
COMMENT "Building ray and all dependencies...")
###############################################################################
endif()