mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
apply to linux&win
This commit is contained in:
parent
0f647148e5
commit
b4539c272d
1 changed files with 4 additions and 2 deletions
|
|
@ -160,10 +160,12 @@
|
|||
endif()
|
||||
|
||||
# relocatable-device-code=true
|
||||
if (MSVC AND CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.8)
|
||||
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.8)
|
||||
set_target_properties(${target} PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:--relocatable-device-code=true>")
|
||||
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /wd4505>")
|
||||
if (MSVC)
|
||||
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /wd4505>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
|
|
|
|||
Loading…
Reference in a new issue