@@ -31,11 +31,12 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
3131 add_compile_options (-pedantic-errors)
3232 endif ()
3333 add_compile_options (-std=f2018)
34- elseif (CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
35- add_compile_options (-warn declarations,general,usage,interfaces,unused )
36- if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0 )
37- add_compile_options (- stand f15 )
34+ elseif (CMAKE_Fortran_COMPILER_ID MATCHES "^ Intel" )
35+ if ( WIN32 )
36+ add_compile_options (/warn:declarations,general,usage,interfaces,unused )
37+ add_compile_options (/ stand:f18 )
3838 else ()
39+ add_compile_options (-warn declarations,general,usage,interfaces,unused)
3940 add_compile_options (-stand f18)
4041 endif ()
4142elseif (CMAKE_Fortran_COMPILER_ID STREQUAL PGI)
@@ -45,7 +46,7 @@ endif()
4546# --- compiler feature checks
4647include (CheckFortranSourceCompiles)
4748include (CheckFortranSourceRuns)
48- check_fortran_source_runs("i=0; error stop i; end" f18errorstop SRC_EXT f90 )
49+ check_fortran_source_runs("i=0; error stop i; end" f18errorstop)
4950check_fortran_source_compiles("real, allocatable :: array(:, :, :, :, :, :, :, :, :, :); end" f03rank SRC_EXT f90)
5051check_fortran_source_runs("use, intrinsic :: iso_fortran_env, only : real128; real(real128) :: x; x = x+1; end" f03real128)
5152
0 commit comments