mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 21:00:17 -06:00
Fixes #17559 Replace our hard-coded default of cudart=static with a first-class abstraction to select the runtime library from an enumeration of logical names.
17 lines
437 B
CMake
17 lines
437 B
CMake
|
|
string(REPLACE "|" ";" dirs "${EXTRA_LIB_DIRS}")
|
|
file(GET_RUNTIME_DEPENDENCIES
|
|
RESOLVED_DEPENDENCIES_VAR resolved_libs
|
|
UNRESOLVED_DEPENDENCIES_VAR unresolved_libs
|
|
DIRECTORIES ${dirs}
|
|
EXECUTABLES ${EXEC_PATH}
|
|
)
|
|
|
|
list(FILTER resolved_libs INCLUDE REGEX ".*cudart.*")
|
|
list(LENGTH resolved_libs has_cudart)
|
|
|
|
if(has_cudart EQUAL 0)
|
|
message(FATAL_ERROR
|
|
"missing cudart shared library from runtime dependency output.")
|
|
endif()
|