Skip to content

Commit

Permalink
Fix Fortran module installation (AMReX-Codes#3411)
Browse files Browse the repository at this point in the history
It was broken in AMReX-Codes#3309, in which multi-D support was added.
  • Loading branch information
WeiqunZhang authored Jul 15, 2023
1 parent 5376bf8 commit 5a90c26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/CMake/AMReXInstallHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ function (install_amrex_targets)

# Install fortran modules if Fortran is enabled
get_property(_lang GLOBAL PROPERTY ENABLED_LANGUAGES)
if ("Fortran" IN_LIST _lang AND "amrex" IN_LIST _targets)
get_target_property(_mod_dir amrex Fortran_MODULE_DIRECTORY )
if ("Fortran" IN_LIST _lang AND "amrex_${AMReX_SPACEDIM_LAST}d" IN_LIST _targets)
get_target_property(_mod_dir "amrex_${AMReX_SPACEDIM_LAST}d" Fortran_MODULE_DIRECTORY )
install( DIRECTORY ${_mod_dir}/ DESTINATION include ) # Trailing backslash is crucial here!
endif ()

Expand Down

0 comments on commit 5a90c26

Please sign in to comment.