From 8a7c1c58cd87f1069e278dbee57883456aeb3ec0 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Wed, 17 Mar 2021 16:44:09 +0100 Subject: [PATCH] bootstrap_gpujpeg.sh: compat with older CMake --- bootstrap_gpujpeg.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bootstrap_gpujpeg.sh b/bootstrap_gpujpeg.sh index 9ccd48e0e..a6d4ef571 100755 --- a/bootstrap_gpujpeg.sh +++ b/bootstrap_gpujpeg.sh @@ -1,5 +1,6 @@ #!/bin/sh -e +UG_SRC_PATH=$(dirname $0) SRC_DIR=ext-deps/gpujpeg BUILD_DIR=$SRC_DIR/build INSTALL_DIR=$SRC_DIR/install @@ -54,8 +55,13 @@ else git clone --depth 1 https://github.com/CESNET/GPUJPEG.git $SRC_DIR fi [ $DOWNLOAD_ONLY = yes ] && exit 0 -cmake $CMAKE_ARGUMENTS $SRC_DIR -B $BUILD_DIR -cmake --build $BUILD_DIR --parallel +cmake $CMAKE_ARGUMENTS $SRC_DIR -B$BUILD_DIR +CMAKE_COMPILE_FLAGS= +CMAKE_VER=`cmake --version | head -n 1 | cut -f 3 -d\ ` +if [ "$($UG_SRC_PATH/.github/scripts/Linux/utils/semver.sh $CMAKE_VER 3.12)" -ge 0 ]; then + CMAKE_COMPILE_FLAGS=--parallel +fi +cmake --build $BUILD_DIR $CMAKE_COMPILE_FLAGS ${SUDO}cmake --install $BUILD_DIR # vim: set noexpandtab: