File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ endif()
287
287
if (DEP_USE_JEMALLOC )
288
288
set (DEP_OPTIONS ${DEP_OPTIONS} --jemalloc )
289
289
endif ()
290
- add_custom_target (install_dependencies ALL COMMAND ${CMAKE_SOURCE_DIR} /contrib/deps/install_deps.sh ${DEP_OPTIONS} "${DEP_DOWNLOAD_PREFIX} " "${DEP_BUILD_PREFIX} " "${DEP_INSTALL_PREFIX} " )
290
+ add_custom_target (install_dependencies ALL COMMAND ${CMAKE_SOURCE_DIR} /contrib/deps/install_deps.sh ${DEP_OPTIONS} "${DEP_DOWNLOAD_PREFIX} " "${DEP_BUILD_PREFIX} " "${DEP_INSTALL_PREFIX} " " ${CMAKE_VERSION} " " ${CMAKE_SYSTEM_NAME} " )
291
291
292
292
# Find zlib
293
293
pkg_search_module (ZLIB zlib )
Original file line number Diff line number Diff line change @@ -118,16 +118,25 @@ if [[ "$#" -lt 3 ]]; then
118
118
exit 1
119
119
fi
120
120
121
+ if [[ " $# " -lt 5 ]]
122
+ then
123
+ echo " Syntax: $0 download_dir build_dir install_dir CMAKE_VERSION CMAKE_SYSTEM_NAME" >&2
124
+ exit 1
125
+ fi
126
+
121
127
# dependency download path
122
- mkdir -p " $1 "
123
128
DOWNLOAD_DIR=$( realpath " $1 " )
129
+ mkdir -p " ${DOWNLOAD_DIR} "
124
130
125
- mkdir -p " $2 "
126
131
BUILD_DIR=$( realpath " $2 " )
132
+ mkdir -p " ${BUILD_DIR} "
127
133
128
134
# dependency install path
129
- mkdir -p " $3 "
130
135
INSTALL_DIR=$( realpath " $3 " )
136
+ mkdir -p " ${INSTALL_DIR} "
137
+
138
+ CMAKE_VERSION=" $4 "
139
+ CMAKE_SYSTEM_NAME=" $5 "
131
140
132
141
export SCRIPT_PATH
133
142
export DOWNLOAD_DIR
@@ -147,13 +156,14 @@ if [[ "${JEMALLOC}" == "true" ]]; then
147
156
source " ${SCRIPT_PATH} /jemalloc.sh"
148
157
fi
149
158
150
- CMAKE_VERSION=$( cmake --version | head -n 1 | awk ' { print $3 }' )
151
159
ACCEPTABLE_VERSION=3.5
152
160
HIGHEST_VERSION=$( (echo " ${CMAKE_VERSION} " ; echo " ${ACCEPTABLE_VERSION} " ) | sort -rV | head -1)
153
161
154
- if [[ " ${CMAKE_VERSION} " == " ${HIGHEST_VERSION} " ]]; then
155
- if [[ " ${BUILD_CXX} " == " true" ]]; then
156
- echo " Installing GoogleTest"
157
- source " ${SCRIPT_PATH} /googletest.sh"
162
+ if [[ " ${CMAKE_SYSTEM_NAME} " != " CYGWIN" ]]; then
163
+ if [[ " ${CMAKE_VERSION} " == " ${HIGHEST_VERSION} " ]]; then
164
+ if [[ " ${BUILD_CXX} " == " true" ]]; then
165
+ echo " Installing GoogleTest"
166
+ source " ${SCRIPT_PATH} /googletest.sh"
167
+ fi
158
168
fi
159
169
fi
You can’t perform that action at this time.
0 commit comments