diff --git a/src/acc/model.cmake b/src/acc/model.cmake index a85ea03..cb047ef 100644 --- a/src/acc/model.cmake +++ b/src/acc/model.cmake @@ -45,6 +45,11 @@ register_flag_optional(TARGET_PROCESSOR set(ACC_FLAGS_OFFLOAD_GNU -foffload=-lm) +register_flag_optional(OFFLOAD_FLAGS + "OpenACC Offload Flags" + "" +) + macro(setup) find_package(OpenACC REQUIRED) @@ -89,5 +94,11 @@ macro(setup) endif () + if(NOT "${OFFLOAD_FLAGS}" STREQUAL "") + separate_arguments(OFFLOAD_FLAGS) + register_append_cxx_flags(ANY ${OFFLOAD_FLAGS}) + register_append_link_flags(${OFFLOAD_FLAGS}) + endif() + endmacro()