@@ -31,21 +31,20 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
31
31
add_compile_options (-pedantic-errors)
32
32
endif ()
33
33
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 )
38
38
else ()
39
+ add_compile_options (-warn declarations,general,usage,interfaces,unused)
39
40
add_compile_options (-stand f18)
40
41
endif ()
41
- elseif (CMAKE_Fortran_COMPILER_ID STREQUAL PGI)
42
- add_compile_options (-Mdclchk)
43
42
endif ()
44
43
45
44
# --- compiler feature checks
46
45
include (CheckFortranSourceCompiles)
47
46
include (CheckFortranSourceRuns)
48
- check_fortran_source_runs("i=0; error stop i; end" f18errorstop SRC_EXT f90 )
47
+ check_fortran_source_runs("i=0; error stop i; end" f18errorstop)
49
48
check_fortran_source_compiles("real, allocatable :: array(:, :, :, :, :, :, :, :, :, :); end" f03rank SRC_EXT f90)
50
49
check_fortran_source_runs("use, intrinsic :: iso_fortran_env, only : real128; real(real128) :: x; x = x+1; end" f03real128)
51
50
0 commit comments