I have tried to create both PR and issue, but they are autoclosed, so I’m posting here.
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") # Intel fortran
if(WIN32)
set (CCMAKE_Fortran_FLAG ${CCMAKE_Fortran_FLAGS} "/warn:all")
else()
set (CMAKE_Fortran_FLAGS ${CCMAKE_Fortran_FLAGS} "-warn all")
endif()
CCMAKE
should beCMAKE
, in three places.FLAG
should beFLAGS
.- But: the code should really use
FFLAGS
instead of internal cmakeCMAKE_Fortran_FLAGS
. Setting the latter effectively blocksFFLAGS
from being used at all.
Lower in the file there is a comment which reads GFrotran
(yes, with a typo). Should be fixed as well.
Background: I was trying to do exercises with gfortran13
on FreeBSD, so I had to pass -Wl,-rpath=/usr/local/lib/gcc13
option. Inspired by the fact that the FC
environment variable is honored, I’ve defined FFLAGS
– and it did not work. So I have started to look into what cmake
does.