Skip to content

Commit 3b0408f

Browse files
authored
Merge pull request #4202 from msimberg/fix-cuda-target
Fix CUDA configuration
2 parents 0b33f67 + cf90993 commit 3b0408f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmake/HPX_SetupCUDA.cmake

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
66

77

8-
if(HPX_WITH_CUDA)
8+
if(HPX_WITH_CUDA AND NOT TARGET hpx::cuda)
99

1010
find_package(CUDA REQUIRED)
1111
set(HPX_WITH_COMPUTE ON)
@@ -61,7 +61,6 @@ if(HPX_WITH_CUDA)
6161
endif()
6262
target_link_libraries(hpx::cuda INTERFACE cudart)
6363
endif()
64-
target_link_libraries(hpx_base_libraries INTERFACE hpx::cuda)
6564

65+
target_link_libraries(hpx_base_libraries INTERFACE hpx::cuda)
6666
endif()
67-

0 commit comments

Comments
 (0)