Skip to content

Commit

Permalink
CMakeLists: drop some old systems and Intel -extend_source option
Browse files Browse the repository at this point in the history
Removed -extend_source intel flag. It has no effect for .f90 files, and causes an annoying warning.
Some old, machine-specific SYST entries for decomissioned machines dropped.
  • Loading branch information
fjansson committed Dec 7, 2023
1 parent fa44153 commit f658053
Showing 1 changed file with 10 additions and 30 deletions.
40 changes: 10 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,19 @@ if(NOT CMAKE_BUILD_TYPE)
endif()

### Set compiler flags
if("$ENV{SYST}" STREQUAL "HUYGENS")
set(CMAKE_Fortran_COMPILER "mpfort")
set(CMAKE_Fortran_FLAGS "-qfree=F90 -qrealsize=8 -qwarn64 -qflttrap=en:ov:zero:inv:imp -qflag=w:e" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-O4 -qnoipa -qstrict=none:exceptions" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-O2 -g -qfullpath -C -qflttrp=enable:nanq:overflow:zerodivide -qsigtrap -qinitauto=ff" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "CARTESIUS")
if("$ENV{SYST}" STREQUAL "CARTESIUS")
set(CMAKE_Fortran_COMPILER "mpiifort")
set(CMAKE_Fortran_FLAGS "-cpp -r8 -ftz -extend_source" CACHE STRING "")
set(CMAKE_Fortran_FLAGS "-cpp -r8 -ftz" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-traceback -fpe1 -O0 -g -check all" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "localpc_ifort")
set(CMAKE_Fortran_COMPILER "mpif90")
set(CMAKE_Fortran_FLAGS "-cpp -r8 -ftz -extend_source" CACHE STRING "")
set(CMAKE_Fortran_FLAGS "-cpp -r8 -ftz" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-traceback -fpe1 -O0 -g -check all" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "HYDRA")
set(CMAKE_Fortran_COMPILER "mpiifort")
set(CMAKE_Fortran_FLAGS "-cpp -r8 -ftz -extend_source" CACHE STRING "")
set(CMAKE_Fortran_FLAGS "-cpp -r8 -ftz" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-traceback -fpe1 -O0 -g -check all" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "FEDORA")
Expand All @@ -34,31 +29,16 @@ elseif("$ENV{SYST}" STREQUAL "FEDORA")
set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -O3" CACHE STRING "")
set (CMAKE_Fortran_FLAGS_DEBUG "-finit-real=nan -fbounds-check -fbacktrace -fno-f2c -O0 -g -ffpe-trap=invalid,zero,overflow" CACHE STRING "")
set (CMAKE_Fortran_FLAGS_DEV "-fbounds-check -fbacktrace -fno-f2c -O3 -g -ffpe-trap=invalid,zero,overflow" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "ECMWF")
set(CMAKE_Fortran_COMPILER "ftn")
set(CMAKE_Fortran_FLAGS "-s real64" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-g -R b -K trap=fp" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "ECMWF-intel")
set(CMAKE_Fortran_COMPILER "ftn")
set(CMAKE_Fortran_FLAGS "-r8 -ftz -extend_source" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-g -traceback -O3 -xHost" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-traceback -fpe1 -O0 -g -check all" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "ECMWF-gnu")
set(CMAKE_Fortran_COMPILER "ftn")
set(CMAKE_Fortran_FLAGS "-cpp -W -Wall -fdefault-real-8 -fdefault-double-8 -march=native -malign-double -ffree-line-length-none" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -Ofast -g -fbacktrace" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-finit-real=nan -fbounds-check -fbacktrace -fno-f2c -O0 -g -ffpe-trap=invalid,zero,overflow" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "gnu-fast")
set(CMAKE_Fortran_COMPILER "mpif90")
set(CMAKE_Fortran_FLAGS "-cpp -W -Wall -fdefault-real-8 -fdefault-double-8 -march=native -ffree-line-length-none -std=gnu -Werror=implicit-interface" CACHE STRING "")
set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -Ofast -g -fbacktrace" CACHE STRING "")
set (CMAKE_Fortran_FLAGS_DEBUG "-finit-real=nan -fbounds-check -fbacktrace -fno-f2c -O0 -g -ffpe-trap=invalid,zero,overflow" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "lisa-intel")
set(CMAKE_Fortran_COMPILER "mpiifort")
set(CMAKE_Fortran_FLAGS "-cpp -r8 -ftz -extend_source" CACHE STRING "")
set(CMAKE_Fortran_FLAGS "-cpp -r8 -ftz" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-g -traceback -O3 -xHost" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-traceback -fpe1 -O0 -g -check all" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "gnu-fast")
set(CMAKE_Fortran_COMPILER "mpif90")
set(CMAKE_Fortran_FLAGS "-cpp -W -Wall -fdefault-real-8 -fdefault-double-8 -march=native -ffree-line-length-none -std=gnu -Werror=implicit-interface" CACHE STRING "")
set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -Ofast -g -fbacktrace" CACHE STRING "")
set (CMAKE_Fortran_FLAGS_DEBUG "-finit-real=nan -fbounds-check -fbacktrace -fno-f2c -O0 -g -ffpe-trap=invalid,zero,overflow" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "FX-Fujitsu")
set(CMAKE_Fortran_COMPILER "mpifrtpx")
set(CMAKE_Fortran_FLAGS "-Cpp -CcdRR8 -g -Koptmsg=2" CACHE STRING "")
Expand Down

0 comments on commit f658053

Please sign in to comment.