forked from janelia-flyem/buildem
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnumpy.cmake
More file actions
53 lines (43 loc) · 1.47 KB
/
numpy.cmake
File metadata and controls
53 lines (43 loc) · 1.47 KB
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
#
# Install numpy from source
#
if (NOT numpy_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
include (FortranSupport)
include (EasyInstall)
include (python)
include (nose)
include (atlas)
external_source (numpy
1.7.0
numpy-1.7.0.tar.gz
4fa54e40b6a243416f0248123b6ec332
http://downloads.sourceforge.net/project/numpy/NumPy/1.7.0)
# Select FORTRAN ABI
if (Fortran_COMPILER_NAME STREQUAL "gfortran")
set (fortran_abi "gnu95")
elseif (Fortran_COMPILER_NAME STREQUAL "g77")
set (fortran_abi "gnu")
else ()
message (FATAL_ERROR "Unable to set FORTRAN ABI for numpy. Does not support ${Fortran_COMPILER_NAME}!")
endif ()
set (ENV{ATLAS} ${BUILDEM_DIR}/lib/libtatlas.so:${BUILDEM_DIR}/lib/libsatlas.so)
# Download and install numpy
message ("Installing ${numpy_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${numpy_NAME}
DEPENDS ${python_NAME} ${nose_NAME} ${atlas_NAME}
PREFIX ${BUILDEM_DIR}
URL ${numpy_URL}
URL_MD5 ${numpy_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build --fcompiler=${fortran_abi}
BUILD_IN_SOURCE 1
INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install
)
set_target_properties(${numpy_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT numpy_NAME)