Skip to content

Commit

Permalink
230629.080123.CST correct fortran Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
zaikunzhang committed Jun 29, 2023
1 parent 202d819 commit 77971fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fortran/tests/makefiles/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,10 @@ ftest_i2_r16_d1_tst_c ftest_i4_r16_d1_tst_c ftest_i8_r16_d1_tst_c ftest_i2_r16_d
# 1. In the debug mode, our code includes the BACKTRACE function if the compiler is gfortran. This
# makes the code not standard-conforming. So -std=f$(FSTD) cannot be imposed without -fall-intrinsics.
# 2. As of 2022, -Wextra implies -Wcompare-reals, -Wunused-parameter, and -Wdo-subscript.
# 3. For `$$((10#$(FS)))`, see https://stackoverflow.com/questions/24777597/value-too-great-for-base-error-token-is-08
#GFORT := gfortran -pg # Compile for profiling with the gprof profiler. Does not work with macOS on GitHub Actions due to missing gcrt1.o
GFORT := gfortran
GFSTD := $(shell [[ $$(($(GFORT) -dumpversion 2>/dev/null || echo 0) | sed 's|\..*||') -gt 8 ]] && ([[ $(FS) -lt 18 ]] && echo -std=f2018 || echo -std=f20$(FS)) || echo "")
GFSTD := $(shell [[ $$(($(GFORT) -dumpversion 2>/dev/null || echo 0) | sed 's|\..*||') -gt 8 ]] && ([[ $$((10#$(FS))) -lt 18 ]] && echo -std=f2018 || echo -std=f20$(FS)) || echo "")
# 1. gfortran 7 raises a false positive warning regarding "maybe-uninitialized" of allocatable arrays.
# See https://stackoverflow.com/questions/56261880/fortran-re-allocation-on-assignment-and-gfortran-warnings
# 2. As of gfortran 11, gfortran raises a false positive warning regarding "maybe-uninitialized" of
Expand Down

0 comments on commit 77971fd

Please sign in to comment.