Commit 33f6f0be authored by Kenneth Moreland's avatar Kenneth Moreland Committed by Kitware Robot
Browse files

Merge topic 'handle_cmake_policy_105'

97944e59

 Correctly handle when to use `DEVICE_LINK` generator expression
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland's avatarKenneth Moreland <kmorel@acm.org>
Merge-request: !2458
parents 2bd4805f 97944e59
......@@ -254,9 +254,12 @@ if(VTKm_ENABLE_CUDA)
endif()
string(REPLACE ";" " " arch_flags "${arch_flags}")
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
#We propagate cuda flags via target* options so that they
#export cleanly
if(POLICY CMP0105)
cmake_policy(GET CMP0105 policy_105_enabled)
endif()
if(policy_105_enabled STREQUAL "NEW")
set(CMAKE_CUDA_ARCHITECTURES OFF)
target_compile_options(vtkm_cuda INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:${arch_flags}>)
target_link_options(vtkm_cuda INTERFACE $<DEVICE_LINK:${arch_flags}>)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment