From 09d312c802399389464c98fc35a63567259ed5ab Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Tue, 20 Jul 2021 23:35:02 -0400 Subject: [PATCH 1/2] cmake: correct intel compiler options --- CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bc642a66..8896f14e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,11 +31,12 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) add_compile_options(-pedantic-errors) endif() add_compile_options(-std=f2018) -elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) - add_compile_options(-warn declarations,general,usage,interfaces,unused) - if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0) - add_compile_options(-stand f15) +elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^Intel") + if(WIN32) + add_compile_options(/warn:declarations,general,usage,interfaces,unused) + add_compile_options(/stand:f18) else() + add_compile_options(-warn declarations,general,usage,interfaces,unused) add_compile_options(-stand f18) endif() elseif(CMAKE_Fortran_COMPILER_ID STREQUAL PGI) @@ -45,7 +46,7 @@ endif() # --- compiler feature checks include(CheckFortranSourceCompiles) include(CheckFortranSourceRuns) -check_fortran_source_runs("i=0; error stop i; end" f18errorstop SRC_EXT f90) +check_fortran_source_runs("i=0; error stop i; end" f18errorstop) check_fortran_source_compiles("real, allocatable :: array(:, :, :, :, :, :, :, :, :, :); end" f03rank SRC_EXT f90) check_fortran_source_runs("use, intrinsic :: iso_fortran_env, only : real128; real(real128) :: x; x = x+1; end" f03real128) From 6b4c543ef223684fc048163ce398d7c2eeacc567 Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Tue, 20 Jul 2021 23:37:43 -0400 Subject: [PATCH 2/2] cmake: remove discontinued PGI, which didn't work with stdlib anyway --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8896f14e6..72cf3a979 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,8 +39,6 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^Intel") add_compile_options(-warn declarations,general,usage,interfaces,unused) add_compile_options(-stand f18) endif() -elseif(CMAKE_Fortran_COMPILER_ID STREQUAL PGI) - add_compile_options(-Mdclchk) endif() # --- compiler feature checks