summaryrefslogtreecommitdiff
path: root/script/build-libgit2.sh
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-12-06 06:13:38 -0800
committerGitHub <[email protected]>2020-12-06 06:13:38 -0800
commit54afccfa0f5a5574525cbba3b4568cbda252a3df (patch)
treeb0234aaf89bb7c0fd791f98244507b74e1000da3 /script/build-libgit2.sh
parent5d8eaf7e65c404a0d10d3705697dd99369630dda (diff)
Build improvements (#707)
This change makes the test be verbose and use parallelization if possible (when using gmake to build).
Diffstat (limited to 'script/build-libgit2.sh')
-rwxr-xr-xscript/build-libgit2.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/script/build-libgit2.sh b/script/build-libgit2.sh
index 5c420cd..e9c6c9c 100755
--- a/script/build-libgit2.sh
+++ b/script/build-libgit2.sh
@@ -71,4 +71,9 @@ cmake -DTHREADSAFE=ON \
-DDEPRECATE_HARD=ON \
"${VENDORED_PATH}" &&
+if which gmake nproc >/dev/null && [ -f Makefile ]; then
+ # Make the build parallel if gmake is available and cmake used Makefiles.
+ exec gmake "-j$(nproc --all)" install
+fi
+
exec cmake --build . --target install