From 518431998ea393e017e30b2164cdab43a52f7266 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Mon, 26 Feb 2024 09:26:12 -0500 Subject: [PATCH] Add support for Fujitsu compiler This PR adds support for the Fujitsu compiler based on settings provided by @wkensuke in https://github.com/Goddard-Fortran-Ecosystem/gFTL-shared/issues/71 --- ChangeLog.md | 4 ++++ cmake/Fujitsu.cmake | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 cmake/Fujitsu.cmake diff --git a/ChangeLog.md b/ChangeLog.md index 8113035..ebe7a2a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Fujitsu compiler support + ## [1.2.0] - 2023-11-29 ### Fixed diff --git a/cmake/Fujitsu.cmake b/cmake/Fujitsu.cmake new file mode 100644 index 0000000..1ff2b00 --- /dev/null +++ b/cmake/Fujitsu.cmake @@ -0,0 +1,14 @@ +if (CMAKE_Fortran_COMPILER_ID MATCHES Fujitsu) + if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.10.0) + message(FATAL_ERROR "${CMAKE_Fortran_COMPILER_ID} version must be at least 4.10.0!") + endif () +endif () + +# Compiler specific flags for Fujitsu Fortran compiler + +set(check_all "-Nquickdbg") +set(cpp "-Cfpp") + +set(CMAKE_Fortran_FLAGS_DEBUG "-O0 ${check_all}") +set(CMAKE_Fortran_FLAGS_RELEASE "-O3") +set(CMAKE_Fortran_FLAGS "-g ${cpp} -Nalloc_assign -Free")