forked from fblumenthal/buildem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mpfr.cmake
42 lines (34 loc) · 1.16 KB
/
mpfr.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
#
# Install mpfr from source
#
if (NOT mpfr_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
include (PatchSupport)
include (gmp)
external_source (mpfr
3.1.1
mpfr-3.1.1.tar.gz
769411e241a3f063ae1319eb5fac2462
http://www.mpfr.org/mpfr-current/)
message ("Installing ${mpfr_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${mpfr_NAME}
DEPENDS ${gmp_NAME}
PREFIX ${BUILDEM_DIR}
URL ${mpfr_URL}
URL_MD5 ${mpfr_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ${BUILDEM_ENV_STRING} patch -N -Z -p1 < ${PATCH_DIR}/mpfr-3.1.1.patch
CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${mpfr_SRC_DIR}/configure
--prefix=${BUILDEM_DIR}
LDFLAGS=${BUILDEM_LDFLAGS}
CPPFLAGS=-I${BUILDEM_DIR}/include
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(${mpfr_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT mpfr_NAME)