]>
git.proxmox.com Git - libgit2.git/blob - azure-pipelines/build.sh
3 # Environment variables:
5 # SOURCE_DIR: Set to the directory of the libgit2 source (optional)
6 # If not set, it will be derived relative to this script.
10 SOURCE_DIR
=${SOURCE_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && dirname $( pwd ) )}
12 BUILD_PATH
=${BUILD_PATH:=$PATH}
14 CMAKE_GENERATOR
=${CMAKE_GENERATOR:-Unix Makefiles}
16 indent
() { sed "s/^/ /"; }
18 echo "Source directory: ${SOURCE_DIR}"
19 echo "Build directory: ${BUILD_DIR}"
22 if [ "$(uname -s)" = "Darwin" ]; then
27 if [ -f "/etc/debian_version" ]; then
28 echo "Debian version:"
29 (source /etc
/lsb-release
&& echo "${DISTRIB_DESCRIPTION}") | indent
32 echo "Kernel version:"
33 uname
-a 2>&1 | indent
36 env PATH
="$BUILD_PATH" "$CMAKE" --version 2>&1 | indent
38 if test -n "$CC"; then
39 echo "Compiler version:"
40 "$CC" --version 2>&1 | indent
44 echo "##############################################################################"
45 echo "## Configuring build environment"
46 echo "##############################################################################"
48 echo cmake
${SOURCE_DIR} -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G \"${CMAKE_GENERATOR}\" ${CMAKE_OPTIONS}
49 env PATH
="$BUILD_PATH" "$CMAKE" ${SOURCE_DIR} -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G "${CMAKE_GENERATOR}" ${CMAKE_OPTIONS}
52 echo "##############################################################################"
53 echo "## Building libgit2"
54 echo "##############################################################################"
56 env PATH
="$BUILD_PATH" "$CMAKE" --build .