From b660c4594f47f1991b51c929477553393e773789 Mon Sep 17 00:00:00 2001 From: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com> Date: Fri, 4 Sep 2020 10:44:35 -0400 Subject: [PATCH] Add (gnu) compiler option to allow argument mismatch. (#179) gfortran 10.x treats argument mismatch as error --- sorc/ncep_post.fd/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sorc/ncep_post.fd/CMakeLists.txt b/sorc/ncep_post.fd/CMakeLists.txt index aaf9599bc..13f8d7e02 100644 --- a/sorc/ncep_post.fd/CMakeLists.txt +++ b/sorc/ncep_post.fd/CMakeLists.txt @@ -185,6 +185,9 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") "-g -fbacktrace -ffree-form -ffree-line-length-none -fconvert=big-endian") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -ggdb -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check") + if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") + endif() endif() set(LIBNAME "nceppost")