diff options
author | Allen Winter <allen.winter@kdab.com> | 2022-10-06 15:17:04 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2022-10-06 15:17:04 -0400 |
commit | 6c0a830af64fb40d1db0f32135dc30c280af6cca (patch) | |
tree | 5fc7bcf5b70e9cf7d1dc36648277f427e97e5859 /scripts | |
parent | 537642936828ec21c1fb5543dfe85d9898ed9232 (diff) | |
parent | a3757f078af3049bd6dbab377b13e7cecd08eb31 (diff) | |
download | libical-git-6c0a830af64fb40d1db0f32135dc30c280af6cca.tar.gz |
Merge branch '3.0'
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/buildtests.sh | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/scripts/buildtests.sh b/scripts/buildtests.sh index b76b192f..b74b4578 100755 --- a/scripts/buildtests.sh +++ b/scripts/buildtests.sh @@ -52,7 +52,11 @@ COMMAND_EXISTS () { command -v $1 >/dev/null 2>&1 if ( test $? != 0 ) then - echo "$1 is not in your PATH. Either install this program or skip the assocatied test" + echo "$1 is not in your PATH. Either install this program or skip the associated test" + if ( test "$2" ) + then + echo "or disable this check by passing the $2 command-line option" + fi exit 1 fi } @@ -144,7 +148,12 @@ CONFIGURE() { mkdir -p $BDIR cd $BDIR rm -rf * - cmake --warn-uninitialized -Werror=dev .. $2 || exit 1 + if ( test `echo $2 | grep -ci Ninja` -gt 0 ) + then + cmake --warn-uninitialized -Werror=dev .. $2 || exit 1 + else + cmake -G "Unix Makefiles" --warn-uninitialized -Werror=dev .. $2 || exit 1 + fi } #function CLEAN: @@ -311,7 +320,7 @@ CPPCHECK() { echo "===== CPPCHECK TEST $1 DISABLED DUE TO COMMAND LINE OPTION =====" return fi - COMMAND_EXISTS "cppcheck" + COMMAND_EXISTS "cppcheck" "-c" echo "===== START SETUP FOR CPPCHECK: $1 ======" #first build it @@ -373,7 +382,7 @@ SPLINT() { echo "===== SPLINT TEST $1 DISABLED DUE TO COMMAND LINE OPTION =====" return fi - COMMAND_EXISTS "splint" + COMMAND_EXISTS "splint" "-s" echo "===== START SETUP FOR SPLINT: $1 ======" #first build it @@ -459,7 +468,7 @@ CLANGTIDY() { echo "===== CLANG-TIDY TEST $1 DISABLED DUE TO COMMAND LINE OPTION =====" return fi - COMMAND_EXISTS "clang-tidy" + COMMAND_EXISTS "clang-tidy" "-t" echo "===== START CLANG-TIDY: $1 =====" cd $TOP SET_CLANG @@ -480,7 +489,7 @@ CLANGSCAN() { echo "===== SCAN-BUILD TEST $1 DISABLED DUE TO COMMAND LINE OPTION =====" return fi - COMMAND_EXISTS "scan-build" + COMMAND_EXISTS "scan-build" "-b" echo "===== START SCAN-BUILD: $1 =====" cd $TOP @@ -505,7 +514,7 @@ KRAZY() { echo "===== KRAZY TEST DISABLED DUE TO COMMAND LINE OPTION =====" return fi - COMMAND_EXISTS "krazy2all" + COMMAND_EXISTS "krazy2all" "-k" echo "===== START KRAZY =====" cd $TOP krazy2all 2>&1 | tee krazy.out @@ -601,7 +610,7 @@ then exit 1 fi # read the min required CMake version from the top-level CMake file - minCMakeVers=`grep -i cmake_minimum_required $TOP/CMakeLists.txt | grep VERSION | sed 's/^.*VERSION\s*//' | cut -d. -f1-2 | sed 's/\s*).*$//'` + minCMakeVers=`grep -i cmake_minimum_required $TOP/CMakeLists.txt | grep VERSION | sed 's/^.*VERSION\s*//' | cut -d. -f1-2 | sed 's/\s*).*$//' | awk '{print $NF}'` # adjust PATH X=`echo $minCMakeVers | cut -d. -f1` Y=`echo $minCMakeVers | cut -d. -f2` |