Skip to content
Snippets Groups Projects
Commit d5bbe7d3 authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Give the compiler a chance to clean its temporary files when requesting its...

Give the compiler a chance to clean its temporary files when requesting its version at the configure time.
parent 676cbcfe
No related branches found
No related tags found
No related merge requests found
......@@ -115,7 +115,15 @@ case "$CC" in
clang*) COMP_VERSION=`$CC --version | head -n 1`;;
sxc*) COMP_VERSION=`$CC -V 2>&1 | tail -n 1`;;
xlc*) COMP_VERSION=`$CC -qversion 2>&1 | head -n 1`;;
*) COMP_VERSION=`$CC -V 2>&1 | head -n 1`;;
*)
# 'head -n 1' exits after printing the first line, which closes the pipe
# and kills the compiler's process leaving it no chance to clean any
# temporary files it might have created (e.g. Intel compiler creates
# 'a.out' when it is called with additional flags like -I, -L, etc.,
# which is the case when $CC is an MPI wrapper). Therefore, we have to
# run the processes one after another:
COMP_VERSION=`$CC -V 2>&1`
COMP_VERSION=`echo "$COMP_VERSION" | head -n 1` ;;
esac
if test -z "$COMP_VERSION" ; then COMP_VERSION="unknown"; fi;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment