Skip to content
Permalink
Browse files

travis/install-post: ensure exit code is always 0

If we early-exited, clang++ won't exist and causes this script to exit
abnormally.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
  • Loading branch information...
tycho committed Feb 24, 2019
1 parent 3bbf20b commit e3eb2eec5a5e9e822fe069102a2e3a76c0ca40b6
Showing with 3 additions and 2 deletions.
  1. +1 −0 .travis/install-post.sh
  2. +1 −1 src/openmp-detect-meson.sh
  3. +1 −1 src/openmp-detect.sh
@@ -6,3 +6,4 @@ set -x
meson --version
g++ --version
clang++ --version
exit 0
@@ -17,7 +17,7 @@ fi
# Compile and link with separate steps, ensuring that -fopenmp doesn't get
# passed to the linker if we have a $LIB_FLAG specified.
if ${CC} ${OMP_FLAG} -c -o openmp-test.o openmp-test.c &>/dev/null; then
if ${CC} -o openmp-test openmp-test.o ${LIB_FLAG} &>/dev/null; then
if ${CC} -o openmp-test openmp-test.o ${LIB_FLAG} -lm &>/dev/null; then
if env KMP_AFFINITY=verbose OMP_NUM_THREADS=2 ./openmp-test &>/dev/null; then
exit 0
fi
@@ -19,7 +19,7 @@ try_flags() {
# Compile and link with separate steps, ensuring that -fopenmp doesn't get
# passed to the linker if we have a $LIB_FLAG specified.
if ${CC} ${OMP_FLAG} -c -o openmp-test.o openmp-test.c &>/dev/null; then
if ${CC} -o openmp-test openmp-test.o ${LIB_FLAG} &>/dev/null; then
if ${CC} -o openmp-test openmp-test.o ${LIB_FLAG} -lm &>/dev/null; then
if env KMP_AFFINITY=verbose OMP_NUM_THREADS=2 ./openmp-test &>/dev/null; then
cat > openmp.mk.tmp <<-EOF
OPENMP_SUPPORTED := Yes

0 comments on commit e3eb2ee

Please sign in to comment.
You can’t perform that action at this time.