Skip to content

Commit

Permalink
Propagate acc link flags via target_link_options
Browse files Browse the repository at this point in the history
  • Loading branch information
awnawab committed Sep 26, 2024
1 parent 2a9135a commit 8c1620e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ecwam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ ecwam_target_fortran_module_directory(
)

if( HAVE_ACC )
target_link_options( ${ecwam} INTERFACE ${OpenACC_Fortran_FLAGS} )
target_compile_options( ${ecwam} PRIVATE "-gpu=maxregcount:128" )
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/programs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ foreach( program
ecbuild_add_executable(
TARGET ${PROJECT_NAME}-${program}
SOURCES ${program}.F90
LIBS ${PROJECT_NAME} ${OpenMP_Fortran_LIBRARIES} $<${HAVE_ACC}:OpenACC::OpenACC_Fortran>
LIBS ${PROJECT_NAME} ${OpenMP_Fortran_LIBRARIES}
LINKER_LANGUAGE Fortran
)
ecwam_target_compile_definitions_FILENAME(${PROJECT_NAME}-${program})
Expand Down

0 comments on commit 8c1620e

Please sign in to comment.