mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-14 02:59:53 -06:00
`CUDA_RESOLVE_DEVICE_SYMBOLS` can be used with shared, module, and executable target types. This relaxation is to allow for better interoperability with linkers that automatically do CUDA device symbol resolution and have no way to disable it.
15 lines
418 B
CMake
15 lines
418 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("${OUTPUT}" MATCHES "${SYMBOL_NAME}")
|
|
message(FATAL_ERROR
|
|
"The '${SYMBOL_NAME}' symbol is defined; device linking occurred!")
|
|
endif()
|