azure: avoid executing compiler if there is none Until now, we always had the CC variable defined in the build.sh pipeline. But as we're about to migrate the Windows jobs to Bash, as well, those will not have CC defined and thus we cannot use "$CC" to determine the compiler version. Fix this by only executing "$CC" if the variable was set.
diff --git a/azure-pipelines/build.sh b/azure-pipelines/build.sh
index ac4d37b..6700d7b 100755
--- a/azure-pipelines/build.sh
+++ b/azure-pipelines/build.sh
@@ -10,7 +10,6 @@ set -e
SOURCE_DIR=${SOURCE_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && dirname $( pwd ) )}
BUILD_DIR=$(pwd)
BUILD_PATH=${BUILD_PATH:=$PATH}
-CC=${CC:-cc}
CMAKE=$(which cmake)
indent() { sed "s/^/ /"; }
@@ -34,8 +33,11 @@ uname -a 2>&1 | indent
echo "CMake version:"
env PATH="$BUILD_PATH" "$CMAKE" --version 2>&1 | indent
-echo "Compiler version:"
-$CC --version 2>&1 | indent
+
+if test -n "$CC"; then
+ echo "Compiler version:"
+ "$CC" --version 2>&1 | indent
+fi
echo ""
echo "##############################################################################"