summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-02-22 21:52:08 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2022-02-27 23:44:19 -0500
commite48bb3b708d75dc0a41590543a5f844509d87d8e (patch)
tree77f28957b2fc833b6d2ff63077adefb6cf59f31d /ci
parentcfdf36f989cadba458c733607476631043af27d0 (diff)
downloadlibgit2-e48bb3b708d75dc0a41590543a5f844509d87d8e.tar.gz
ci: allow for build-time (`cmake --build`) options
Allow for options in the `cmake --build` phase, so that callers can specify (eg) the config type.
Diffstat (limited to 'ci')
-rwxr-xr-xci/build.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/ci/build.sh b/ci/build.sh
index 5a51f925a..21a45af5f 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -59,7 +59,7 @@ echo "##########################################################################
echo "## Configuring build environment"
echo "##############################################################################"
-echo cmake -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G \"${CMAKE_GENERATOR}\" ${CMAKE_OPTIONS} -S \"${SOURCE_DIR}\"
+echo "${CMAKE}" -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G \"${CMAKE_GENERATOR}\" ${CMAKE_OPTIONS} -S \"${SOURCE_DIR}\"
env PATH="${BUILD_PATH}" "${CMAKE}" -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G "${CMAKE_GENERATOR}" ${CMAKE_OPTIONS} -S "${SOURCE_DIR}"
echo ""
@@ -69,10 +69,11 @@ echo "##########################################################################
# Determine parallelism; newer cmake supports `--build --parallel` but
# we cannot yet rely on that.
-if [ "${CMAKE_GENERATOR}" = "Unix Makefiles" -a "${CORES}" != "" ]; then
+if [ "${CMAKE_GENERATOR}" = "Unix Makefiles" -a "${CORES}" != "" -a "${CMAKE_BUILD_OPTIONS}" = "" ]; then
BUILDER=(make -j ${CORES})
else
- BUILDER=("${CMAKE}" --build .)
+ BUILDER=("${CMAKE}" --build . ${CMAKE_BUILD_OPTIONS})
fi
+echo "${BUILDER[@]}"
env PATH="${BUILD_PATH}" "${BUILDER[@]}"