cmake/Tests/CudaOnly/RuntimeControls/uses_static_runtime.cmake

15 lines
411 B
CMake
Raw Normal View History

2020-08-30 11:54:41 +02:00
execute_process(COMMAND ${DUMP_COMMAND} ${DUMP_ARGS} ${TEST_LIBRARY_PATH}
RESULT_VARIABLE RESULT
OUTPUT_VARIABLE OUTPUT
ERROR_VARIABLE ERROR
)
if(NOT "${RESULT}" STREQUAL "0")
message(FATAL_ERROR "${DUMP_COMMAND} failed [${RESULT}] [${OUTPUT}] [${ERROR}]")
endif()
if("${OUTPUT}" MATCHES "__cuda")
message(FATAL_ERROR
"missing cuda device symbols, static runtime linking was not used.")
endif()