forked from fblumenthal/buildem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gmp.cmake
38 lines (31 loc) · 1.07 KB
/
gmp.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
#
# Install gmp from source
#
if (NOT gmp_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
external_source (gmp
5.0.5
gmp-5.0.5.tar.bz2
041487d25e9c230b0c42b106361055fe
ftp://ftp.gnu.org/gnu/gmp)
message ("Installing ${gmp_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${gmp_NAME}
PREFIX ${BUILDEM_DIR}
URL ${gmp_URL}
URL_MD5 ${gmp_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${gmp_SRC_DIR}/configure
--prefix=${BUILDEM_DIR}
"LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}""
"CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}"
BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE)
BUILD_IN_SOURCE 1
TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check
INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install
)
set_target_properties(${gmp_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT gmp_NAME)