mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
Do not try to device link or add CUDA runtime libraries if the language is not enabled. Fixes: #18673 Issue: #18614
9 lines
280 B
CMake
9 lines
280 B
CMake
enable_language(C)
|
|
|
|
add_library(ext_cuda IMPORTED STATIC)
|
|
set_property(TARGET ext_cuda PROPERTY IMPORTED_LOCATION "/does_not_exist")
|
|
set_property(TARGET ext_cuda PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CUDA")
|
|
|
|
add_executable(main empty.c)
|
|
target_link_libraries(main ext_cuda)
|