mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-15 19:20:44 -06:00
Since commit fa45594407 (file(GET_RUNTIME_DEPENDENCIES): Preserve casing
for Windows PE binaries, 2023-03-06) we may find the cudart runtime
library with its on-disk casing instead of always lower-case.
17 lines
455 B
CMake
17 lines
455 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 ".*[Cc][Uu][Dd][Aa][Rr][Tt].*")
|
|
list(LENGTH resolved_libs has_cudart)
|
|
|
|
if(has_cudart EQUAL 0)
|
|
message(FATAL_ERROR
|
|
"missing cudart shared library from runtime dependency output.")
|
|
endif()
|