File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -441,10 +441,15 @@ exit_if_pkg_config_pc_file_missing "caffeine"
441441user_compiler_flags=" ${CPPFLAGS:- } ${FFLAGS:- } "
442442
443443compiler_version=$( $FPM_FC --version)
444- if [[ $compiler_version == * flang* ]]; then
444+ if [[ $compiler_version =~ ' flang' ]]; then
445445 compiler_flag=" -g -O3"
446- else # assume gfortran
446+ elif [[ $compiler_version =~ ' GNU Fortran ' ]] ; then
447447 compiler_flag=" -g -O3 -ffree-line-length-0 -Wno-unused-dummy-argument"
448+ elif [[ $compiler_version =~ ' LFortran' ]]; then
449+ compiler_flag=" -g -O3 --cpp"
450+ else # unknown compiler
451+ compiler_flag=" -g -O2"
452+ echo " WARNING: Failed to detect a recognized Fortran compiler"
448453fi
449454compiler_flag+=" -DASSERT_MULTI_IMAGE -DASSERT_PARALLEL_CALLBACKS"
450455
You can’t perform that action at this time.
0 commit comments