Commit fe534345 authored by Anna Sekuła's avatar Anna Sekuła
Browse files

Compile PDAF with gfortran10 or newer

parent d7f0e71b
Pipeline #403737 passed with stage
in 18 minutes and 59 seconds
......@@ -125,8 +125,18 @@ IF(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
set(CMAKE_CXX_FLAGS_DEBUG "-g -rdynamic -traceback -std=c++14")
set(CMAKE_Fortran_FLAGS_DEBUG "-g -rdynamic -traceback -check all")
ELSE()
set(CMAKE_Fortran_FLAGS "-fdefault-real-8 -m64")
set(COMPILER_DEPENDENT_FORTRAN_FLAGS "-fbounds-check -fimplicit-none -fwhole-file -fcheck=all -pedantic -fbacktrace -Wextra -Wall -Wline-truncation -Wcharacter-truncation -Wsurprising -Waliasing -Wimplicit-interface -Wunused-parameter")
message("compilerID: ${CMAKE_Fortran_COMPILER_ID}")
STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" maj_version "${CMAKE_Fortran_COMPILER_VERSION}")
message("compilerID: ${maj_version}")
# Remve this fix for PDAF 2.0
if (maj_version GREATER_EQUAL 10)
# remove -pedantic, add -fallow-argument-mismatch
set(CMAKE_Fortran_FLAGS "-fdefault-real-8 -m64 -fallow-argument-mismatch")
set(COMPILER_DEPENDENT_FORTRAN_FLAGS "-fbounds-check -fimplicit-none -fwhole-file -fcheck=all -fbacktrace -Wextra -Wall -Wline-truncation -Wcharacter-truncation -Wsurprising -Waliasing -Wimplicit-interface -Wunused-parameter")
else()
set(CMAKE_Fortran_FLAGS "-fdefault-real-8 -m64")
set(COMPILER_DEPENDENT_FORTRAN_FLAGS "-fbounds-check -fimplicit-none -fwhole-file -fcheck=all -pedantic -fbacktrace -Wextra -Wall -Wline-truncation -Wcharacter-truncation -Wsurprising -Waliasing -Wimplicit-interface -Wunused-parameter")
endif()
endif()
set(CMAKE_Fortran_FLAGS_DEBUG "-rdynamic ${CMAKE_Fortran_FLAGS_DEBUG} -O0 ${COMPILER_DEPENDENT_FORTRAN_FLAGS} ")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment