@@ -1553,7 +1553,7 @@ macro(CUDA_ADD_LIBRARY cuda_target)
1553
1553
# variable will have been defined.
1554
1554
CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS ("${link_file} " ${cuda_target} "${_options} " "${${cuda_target} _SEPARABLE_COMPILATION_OBJECTS}" )
1555
1555
1556
- target_link_libraries (${cuda_target}
1556
+ target_link_libraries (${cuda_target} LINK_PRIVATE
1557
1557
${CUDA_LIBRARIES}
1558
1558
)
1559
1559
@@ -1597,7 +1597,7 @@ macro(CUDA_ADD_EXECUTABLE cuda_target)
1597
1597
# variable will have been defined.
1598
1598
CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS ("${link_file} " ${cuda_target} "${_options} " "${${cuda_target} _SEPARABLE_COMPILATION_OBJECTS}" )
1599
1599
1600
- target_link_libraries (${cuda_target}
1600
+ target_link_libraries (${cuda_target} LINK_PRIVATE
1601
1601
${CUDA_LIBRARIES}
1602
1602
)
1603
1603
@@ -1672,9 +1672,9 @@ endmacro()
1672
1672
###############################################################################
1673
1673
macro (CUDA_ADD_CUFFT_TO_TARGET target )
1674
1674
if (CUDA_BUILD_EMULATION )
1675
- target_link_libraries (${target} ${CUDA_cufftemu_LIBRARY} )
1675
+ target_link_libraries (${target} LINK_PRIVATE ${CUDA_cufftemu_LIBRARY} )
1676
1676
else ()
1677
- target_link_libraries (${target} ${CUDA_cufft_LIBRARY} )
1677
+ target_link_libraries (${target} LINK_PRIVATE ${CUDA_cufft_LIBRARY} )
1678
1678
endif ()
1679
1679
endmacro ()
1680
1680
@@ -1685,9 +1685,9 @@ endmacro()
1685
1685
###############################################################################
1686
1686
macro (CUDA_ADD_CUBLAS_TO_TARGET target )
1687
1687
if (CUDA_BUILD_EMULATION )
1688
- target_link_libraries (${target} ${CUDA_cublasemu_LIBRARY} )
1688
+ target_link_libraries (${target} LINK_PRIVATE ${CUDA_cublasemu_LIBRARY} )
1689
1689
else ()
1690
- target_link_libraries (${target} ${CUDA_cublas_LIBRARY} )
1690
+ target_link_libraries (${target} LINK_PRIVATE ${CUDA_cublas_LIBRARY} )
1691
1691
endif ()
1692
1692
endmacro ()
1693
1693
0 commit comments