瀏覽代碼

only run scan_build for clang

Steffen Jaeckel 8 年之前
父節點
當前提交
3f024c0685
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      scan_build.sh

+ 4 - 1
scan_build.sh

@@ -1,5 +1,8 @@
 #!/bin/bash
 #!/bin/bash
-[ "$TRAVIS_CI" != "" ] && { [ -z "$(which scan-build)" ] && { echo "installing clang"; sudo apt-get install clang -y -qq; }; } || true
+if [ "$TRAVIS_CI" != "" ] && [ -z "$(echo $CC | grep "clang")" ]; then
+    echo "no clang detected, early exit success"
+    exit 0
+fi
 
 
 if [ "$#" = "5" -a "$(echo $3 | grep -v 'makefile[.]')" = "" ]; then
 if [ "$#" = "5" -a "$(echo $3 | grep -v 'makefile[.]')" = "" ]; then
     echo "only run $0 for the regular makefile, early exit success"
     echo "only run $0 for the regular makefile, early exit success"