Skip to content

Commit

Permalink
Add options if nvfortran is detected
Browse files Browse the repository at this point in the history
  • Loading branch information
awvwgk committed Aug 29, 2024
1 parent 95d57e1 commit 15d7d04
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ install(
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)

# Compiler-specific configurations
if(
CMAKE_Fortran_COMPILER_ID MATCHES "PGI"
OR CMAKE_Fortran_COMPILER_ID MATCHES "NVHPC"
OR CMAKE_Fortran_COMPILER_ID MATCHES "Flang"
)
set(
CMAKE_Fortran_FLAGS
"${CMAKE_Fortran_FLAGS} -Mbackslash -Mallocatable=03"
PARENT_SCOPE
)
endif()

# Set build type as CMake does not provide defaults
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(
Expand Down

0 comments on commit 15d7d04

Please sign in to comment.