cmake/Tests/CudaOnly/RuntimeControls/verify_runtime.cmake

17 lines
455 B
CMake
Raw Normal View History

2020-08-30 11:54:41 +02:00
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}
)
2023-07-02 19:51:09 +02:00
list(FILTER resolved_libs INCLUDE REGEX ".*[Cc][Uu][Dd][Aa][Rr][Tt].*")
2020-08-30 11:54:41 +02:00
list(LENGTH resolved_libs has_cudart)
if(has_cudart EQUAL 0)
message(FATAL_ERROR
"missing cudart shared library from runtime dependency output.")
endif()