Skip to content

Commit 88e2219

Browse files
authored
Merge pull request #469 from scivision/update_cmake
CMake: corrections and updates
2 parents 9856a79 + 6b4c543 commit 88e2219

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

CMakeLists.txt

+6-7
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,20 @@ 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()
41-
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL PGI)
42-
add_compile_options(-Mdclchk)
4342
endif()
4443

4544
# --- compiler feature checks
4645
include(CheckFortranSourceCompiles)
4746
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)
4948
check_fortran_source_compiles("real, allocatable :: array(:, :, :, :, :, :, :, :, :, :); end" f03rank SRC_EXT f90)
5049
check_fortran_source_runs("use, intrinsic :: iso_fortran_env, only : real128; real(real128) :: x; x = x+1; end" f03real128)
5150

0 commit comments

Comments
 (0)