cmake / 3.20 / prop_tgt / cuda_ptx_compilation.html /

CUDA_PTX_COMPILATION

New in version 3.9.

Compile CUDA sources to .ptx files instead of .obj files within Object Libraries.

For example:

add_library(myptx OBJECT a.cu b.cu)
set_property(TARGET myptx PROPERTY CUDA_PTX_COMPILATION ON)

© 2000–2021 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.20/prop_tgt/CUDA_PTX_COMPILATION.html