Skip to content

Commit 7d07373

Browse files
author
Damian Rouson
authored
Merge pull request #618 from sourceryinstitute/fix-compiler-version-check
Fix installer's minimum-version check for gcc
2 parents 44e0e89 + eab4c10 commit 7d07373

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

prerequisites/install-functions/find_or_install.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,12 @@ find_or_install()
173173

174174
else
175175

176-
info "$this_script: Checking whether $executable in PATH wraps gfortran version >= $minimum_version... "
176+
export minimum_acceptable_version=$(./build.sh -V gcc)
177+
info "$this_script: Checking whether $executable in PATH wraps gfortran version >= $minimum_acceptable_version... "
177178
$executable acceptable_compiler.f90 -o acceptable_compiler || true;
178179
$executable print_true.f90 -o print_true || true;
179180
if [[ -f ./acceptable_compiler && -f ./print_true ]]; then
180-
acceptable=$(./acceptable_compiler $minimum_version)
181+
acceptable=$(./acceptable_compiler $minimum_acceptable_version)
181182
is_true=$(./print_true)
182183
rm acceptable_compiler print_true
183184
else
@@ -278,9 +279,8 @@ find_or_install()
278279
$executable -o print_true print_true.f90 || true;
279280
if [[ -f ./acceptable_compiler && -f ./print_true ]]; then
280281
is_true=$(./print_true)
281-
emergency "Executing `./acceptable_compiler $minimum_version`"
282-
./acceptable_compiler $minimum_version
283-
acceptable=$(./acceptable_compiler $minimum_version)
282+
info "Executing './acceptable_compiler $minimum_acceptable_version'"
283+
acceptable=$(./acceptable_compiler $minimum_acceptable_version)
284284
rm acceptable_compiler print_true
285285
else
286286
acceptable=false

0 commit comments

Comments
 (0)