Skip to content

Commit cf90993

Browse files
committed
Don't define hpx::cuda target if already defined
1 parent 2ba20fe commit cf90993

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)