summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDFFortranCompilerFlags.cmake
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-10-18 22:47:17 (GMT)
committerGitHub <noreply@github.com>2023-10-18 22:47:17 (GMT)
commit1a898e792ee629afa20962a136dbb239f9c8e774 (patch)
treea4c302d5045c869dc209a660002efb45354a90b9 /config/cmake/HDFFortranCompilerFlags.cmake
parent14a2c9eb12b11e6f297aa48edc7b47c485a99429 (diff)
downloadhdf5-1a898e792ee629afa20962a136dbb239f9c8e774.zip
hdf5-1a898e792ee629afa20962a136dbb239f9c8e774.tar.gz
hdf5-1a898e792ee629afa20962a136dbb239f9c8e774.tar.bz2
Add NV flags and update CI (#3711)
Diffstat (limited to 'config/cmake/HDFFortranCompilerFlags.cmake')
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake12
1 files changed, 11 insertions, 1 deletions
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index e08df05..f207c70 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -41,7 +41,7 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
endif ()
#-----------------------------------------------------------------------------
-# HDF5 library compile options
+# HDF5 library compile options - to be made available to all targets
#-----------------------------------------------------------------------------
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0)
if (HDF5_ENABLE_BUILD_DIAGS)
@@ -56,6 +56,16 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "NAG")
message (STATUS "... Select IEEE floating-point mode full")
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-ieee=full")
endif ()
+if (CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC")
+ if (NOT ${HDF_CFG_NAME} MATCHES "Debug" AND NOT ${HDF_CFG_NAME} MATCHES "Developer")
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Mnoframe")
+ if (NOT ${HDF_CFG_NAME} MATCHES "RelWithDebInfo")
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -s")
+ endif ()
+ else ()
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Mbounds -Mchkptr -Mdclchk -g")
+ endif ()
+endif ()
if (NOT MSVC AND NOT MINGW)
# General flags