File tree 6 files changed +25
-20
lines changed
6 files changed +25
-20
lines changed Original file line number Diff line number Diff line change @@ -225,11 +225,12 @@ pkg_search_module(PCRE REQUIRED libpcre)
225
225
set (CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES} " )
226
226
227
227
# Download and build all non-system dependencies
228
- set (DEP_DOWNLOAD_PREFIX "${CMAKE_SOURCE_DIR} /contrib/deps" CACHE PATH "Location of dependency sources" )
229
- set (DEP_BUILD_PREFIX "${CMAKE_BINARY_DIR} /builds" CACHE PATH "Location of dependency builds" )
230
- set (DEP_INSTALL_PREFIX "${CMAKE_BINARY_DIR} /deps" CACHE PATH "Location of dependency binaries" )
231
- set (CLIENT OFF CACHE BOOL "Whether or not to build and install client" )
232
- set (DEP_OPTIONS "" )
228
+ set (DEP_DOWNLOAD_PREFIX "${CMAKE_SOURCE_DIR} /contrib/deps" CACHE PATH "Location of dependency sources" )
229
+ set (DEP_BUILD_PREFIX "${CMAKE_BINARY_DIR} /builds" CACHE PATH "Location of dependency builds" )
230
+ set (DEP_BUILD_THREADS "1" CACHE STRING "Number of build threads" )
231
+ set (DEP_INSTALL_PREFIX "${CMAKE_BINARY_DIR} /deps" CACHE PATH "Location of dependency binaries" )
232
+ set (CLIENT OFF CACHE BOOL "Whether or not to build and install client" )
233
+ set (DEP_OPTIONS --threads "${DEP_BUILD_THREADS} " )
233
234
if (CMAKE_CXX_COMPILER)
234
235
set (DEP_OPTIONS ${DEP_OPTIONS} --cxx)
235
236
endif ()
Original file line number Diff line number Diff line change 8
8
googletest_name=" googletest"
9
9
googletest_prefix=" ${INSTALL_DIR} /${googletest_name} "
10
10
if [[ ! -d " ${googletest_prefix} " ]]; then
11
- googletest_build=" ${BUILD_DIR} /googletest-master "
11
+ googletest_build=" ${BUILD_DIR} /googletest-main "
12
12
if [[ ! -d " ${googletest_build} " ]]; then
13
13
googletest_tarball=" ${DOWNLOAD_DIR} /googletest.tar.gz"
14
14
if [[ ! -f " ${googletest_tarball} " ]]; then
@@ -24,6 +24,6 @@ if [[ ! -d "${googletest_prefix}" ]]; then
24
24
if [[ ! -f Makefile ]]; then
25
25
$CMAKE .. -DCMAKE_INSTALL_PREFIX=" ${googletest_prefix} " -DBUILD_GMOCK=OFF
26
26
fi
27
- make
27
+ make -j " ${THREADS} "
28
28
make install
29
29
fi
Original file line number Diff line number Diff line change 17
17
exit 1
18
18
fi
19
19
20
+ THREADS=" 1"
20
21
BUILD_CXX=" false"
21
22
PARAMIKO=" false"
22
23
28
29
key=" $1 "
29
30
30
31
case $key in
32
+ --threads)
33
+ THREADS=" $2 "
34
+ shift # past count
35
+ ;;
31
36
--cxx)
32
- BUILD_CXX=" true"
33
- shift # past argument
34
- ;;
37
+ BUILD_CXX=" true"
38
+ ;;
35
39
--paramiko)
36
- PARAMIKO=" true"
37
- shift # past argument
38
- ;;
40
+ PARAMIKO=" true"
41
+ ;;
39
42
* ) # unknown option
40
- POSITIONAL+=(" $1 " ) # save it in an array for later
41
- shift # past argument
42
- ;;
43
+ POSITIONAL+=(" $1 " ) # save it in an array for later
44
+ ;;
43
45
esac
46
+ shift # past flag
44
47
done
45
48
set -- " ${POSITIONAL[@]} " # restore positional parameters
46
49
@@ -65,6 +68,7 @@ export DOWNLOAD_DIR
65
68
export BUILD_DIR
66
69
export INSTALL_DIR
67
70
export CMAKE
71
+ export THREADS
68
72
69
73
echo " Installing SQLite3"
70
74
. ${SCRIPT_PATH} /sqlite3.sh
Original file line number Diff line number Diff line change @@ -25,6 +25,6 @@ if [[ ! -d "${jemalloc_prefix}" ]]; then
25
25
if [[ ! -f Makefile ]]; then
26
26
../configure --prefix=" ${jemalloc_prefix} "
27
27
fi
28
- make
28
+ make -j " ${THREADS} "
29
29
make -i install
30
30
fi
Original file line number Diff line number Diff line change @@ -25,6 +25,6 @@ if [[ ! -d "${sqlite3_prefix}" ]]; then
25
25
if [[ ! -f Makefile ]]; then
26
26
CFLAGS=" -USQLITE_TEMP_STORE -DSQLITE_TEMP_STORE=3 -USQLITE_THREADSAFE -DSQLITE_THREADSAFE=0 -USQLITE_MAX_EXPR_DEPTH -DSQLITE_MAX_EXPR_DEPTH=0 -USQLITE_DEFAULT_MEMSTATUS -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DECLTYPE -USQLITE_ENABLE_DBSTAT_VTAB -USQLITE_ENABLE_RTREE -USQLITE_ENABLE_FTS4 -USQLITE_ENABLE_JSON1 -USQLITE_OMIT_PROGRESS_CALLBACK -USQLITE_MAX_ATTACHED -DSQLITE_MAX_ATTACHED=125 -O3" ../configure --prefix=" ${sqlite3_prefix} "
27
27
fi
28
- make
28
+ make -j " ${THREADS} "
29
29
make install
30
30
fi
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ if [[ ! -d "${pcre_prefix}" ]]; then
26
26
cd build
27
27
if [[ ! -f Makefile ]]; then
28
28
export PKG_CONFIG_PATH=" ${INSTALL_DIR} /sqlite3/lib/pkgconfig:${PKG_CONFIG_PATH} "
29
- $CMAKE .. -DCMAKE_INSTALL_PREFIX=" ${pcre_prefix} "
29
+ ${ CMAKE} .. -DCMAKE_INSTALL_PREFIX=" ${pcre_prefix} "
30
30
fi
31
- make
31
+ make -j " ${THREADS} "
32
32
make install
33
33
fi
You can’t perform that action at this time.
0 commit comments