summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-29 11:51:56 -0400
committerBrad King <brad.king@kitware.com>2019-10-29 12:03:54 -0400
commit1dbf485934da62b92bed63defb236254ffbeaa10 (patch)
tree98ed4a3fe610863ed337e93e8effa23a8904fae2
parent92780281c2e8a46223b262b152caa9c8329373b1 (diff)
downloadcmake-1dbf485934da62b92bed63defb236254ffbeaa10.tar.gz
bootstrap: Avoid redundant compiler selection checks
In commit 6e613ff399 (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.
-rwxr-xr-xbootstrap4
1 files changed, 2 insertions, 2 deletions
diff --git a/bootstrap b/bootstrap
index 1f5f066297..883b16551f 100755
--- a/bootstrap
+++ b/bootstrap
@@ -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