Skip to content
Snippets Groups Projects
Commit 1dbf4859 authored by Brad King's avatar Brad King
Browse files

bootstrap: Avoid redundant compiler selection checks

In commit 6e613ff3 (bootstrap: Add infrastructure to detect threading
flags, 2017-11-28, v3.11.0-rc1~281^2~1) an extra level of nesting was
added to the selection loop, but the inner-most `break` command used to
exit the loop on success was not updated.  This caused the outer-most
loop to iterate unnecessarily and repeatedly try the same compilers
again.  In the case of compilers requiring a `-std=` flag, this may have
caused the oldest standard to be used instead of the newest.
parent 92780281
No related branches found
No related tags found
No related merge requests found
......@@ -1092,7 +1092,7 @@ for std in 11 99 90; do
"${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
cmake_c_compiler="${compiler}"
cmake_c_flags="${cmake_c_flags} ${std_flag} ${thread_flag}"
break 3
break 4
fi
done
done
......@@ -1203,7 +1203,7 @@ for std in 17 14 11; do
"${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
cmake_cxx_compiler="${compiler}"
cmake_cxx_flags="${cmake_cxx_flags} ${std_flag} ${thread_flag} "
break 3
break 4
fi
done
done
......
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