Commit 1be4f896 by Patrick Steinhardt

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.
parent 8e356f48
......@@ -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 "##############################################################################"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment