From fef4b5a228880abe0ec1acf35a4f648293837275 Mon Sep 17 00:00:00 2001 From: Joe Schoonover Date: Wed, 12 Jun 2024 18:29:47 +0000 Subject: [PATCH] Add NVHPC flags to CMakeLists.txt; add status badge for nvfortran --- .github/workflows/linux-nvfortran-cmake.yaml | 2 +- CMakeLists.txt | 11 +++++++++-- README.md | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux-nvfortran-cmake.yaml b/.github/workflows/linux-nvfortran-cmake.yaml index df90a0a..957b508 100644 --- a/.github/workflows/linux-nvfortran-cmake.yaml +++ b/.github/workflows/linux-nvfortran-cmake.yaml @@ -1,4 +1,4 @@ -name: linux-amdflang-cmake +name: linux-nvidia-hpc-cmake on: push: diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d3bb06..2e5b54e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,13 +45,20 @@ elseif( "${CMAKE_Fortran_COMPILER_ID}" STREQUAL "IntelLLVM" ) set( CMAKE_C_FLAGS_COVERAGE "-g -O0") elseif( "${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Flang" ) - set( CMAKE_Fortran_FLAGS "-Mpreprocess -fstack-arrays" ) - set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS} -O0 -g -Wall -Mstandard -pedantic" ) + set( CMAKE_Fortran_FLAGS "-Mpreprocess" ) + set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS} -O0 -g -Wall -pedantic" ) set( CMAKE_Fortran_FLAGS_COVERAGE "${CMAKE_Fortran_FLAGS_DEBUG}") # Code coverage not available with ifx set( CMAKE_Fortran_FLAGS_PROFILE "-O3") set( CMAKE_Fortran_FLAGS_RELEASE "-O3" ) set( CMAKE_C_FLAGS_COVERAGE "-g -O0") + elseif( "${CMAKE_Fortran_COMPILER_ID}" STREQUAL "NVHPC" ) + set( CMAKE_Fortran_FLAGS "-Mpreprocess" ) + set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS} -O0 -Wall -C -g -traceback" ) + set( CMAKE_Fortran_FLAGS_COVERAGE "${CMAKE_Fortran_FLAGS_DEBUG}") # Code coverage not available with ifx + set( CMAKE_Fortran_FLAGS_PROFILE "-O3 -Mstack_arrays -Minfo") + set( CMAKE_Fortran_FLAGS_RELEASE "-O3 -Mstack_arrays -Minfo" ) + set( CMAKE_C_FLAGS_COVERAGE "-g -O0") endif() ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/src) diff --git a/README.md b/README.md index 0809f5e..9709d51 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Copyright 2020 Fluid Numerics LLC [![linux-intel-fpm](https://github.com/fluidnumerics/feq-parse/actions/workflows/linux-intel-fpm.yml/badge.svg)](https://github.com/FluidNumerics/feq-parse/actions/workflows/linux-intel-fpm.yml) [![linux-amdflang-cmake](https://github.com/FluidNumerics/feq-parse/actions/workflows/linux-amdflang-cmake.yaml/badge.svg)](https://github.com/FluidNumerics/feq-parse/actions/workflows/linux-amdflang-cmake.yaml) - +[![linux-nvfortran-cmake](https://github.com/FluidNumerics/feq-parse/actions/workflows/linux-nvfortran-cmake.yaml/badge.svg)](https://github.com/FluidNumerics/feq-parse/actions/workflows/linux-nvfortran-cmake.yaml) [![windows-gnu-cmake](https://github.com/fluidnumerics/feq-parse/actions/workflows/windows-gnu-cmake.yml/badge.svg)](https://github.com/FluidNumerics/feq-parse/actions/workflows/windows-gnu-cmake.yml) [![windows-gnu-fpm](https://github.com/fluidnumerics/feq-parse/actions/workflows/windows-gnu-fpm.yml/badge.svg)](https://github.com/FluidNumerics/feq-parse/actions/workflows/windows-gnu-fpm.yml)