There is no way to set -DCMAKE_Fortran_FLAGS="<my-custom-flags>" when compiling. The compile flags from cmake/.cmake are always used.
Suggestion for GNU.cmake: replace line 9 with
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g ${cpp} ${traceback} -ffree-line-length-none")
Suggestion for Intel.cmake and IntelLLVM.cmake line 19
set(CMAKE_Fortran_Flags_ALL "${CMAKE_Fortran_FLAGS} ${cpp} ${disable_warning_for_long_names}")
There is no way to set
-DCMAKE_Fortran_FLAGS="<my-custom-flags>"when compiling. The compile flags from cmake/.cmake are always used.Suggestion for GNU.cmake: replace line 9 with
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g ${cpp} ${traceback} -ffree-line-length-none")Suggestion for Intel.cmake and IntelLLVM.cmake line 19
set(CMAKE_Fortran_Flags_ALL "${CMAKE_Fortran_FLAGS} ${cpp} ${disable_warning_for_long_names}")