mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 05:11:15 -06:00
If a static library has the property CUDA_RESOLVE_DEVICE_SYMBOLS enabled it will now perform the device link step. The normal behavior is to delay calling device link until the static library is consumed by a shared library or an executable.
15 lines
433 B
CMake
15 lines
433 B
CMake
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(NOT "${OUTPUT}" MATCHES "(cmake_device_link|device-link)")
|
|
message(FATAL_ERROR
|
|
"No cuda device objects found, device linking did not occur")
|
|
endif()
|