Commit dd465052 authored by Mark Olesen's avatar Mark Olesen
Browse files

CONFIG: report compiler path and version from top-level build

- previously just reported gcc/clang versions, but these are not
  necessarily the ones actually being used (eg, clang-9 vs clang).
  Now use the path from `wmake -show-path-cxx` to improve the accuracy,
  and also support other compiler types.
parent 1d931f9a
......@@ -15,18 +15,22 @@ wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null || {
. "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments
#------------------------------------------------------------------------------
# Preamble. Report compiler version
case "$WM_COMPILER" in
Gcc*) gcc --version 2>/dev/null | sed -ne '1p' ;;
Clang*) clang --version 2>/dev/null | sed -ne '1p' ;;
esac
# Preamble. Report tools or at least the mpirun location
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/list_tools ]
then . "$WM_PROJECT_DIR"/wmake/scripts/list_tools ]
then . "$WM_PROJECT_DIR"/wmake/scripts/list_tools
else
echo "mpirun=$(command -v mpirun || true)"
fi
echo
# Report compiler information
compiler="$(wmake -show-path-cxx 2>/dev/null || true)"
if [ -x "$compiler" ]
then
echo "compiler=$compiler"
"$compiler" --version 2>/dev/null | sed -ne '1p'
else
echo "compiler=unknown"
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