cmake / 3.14.7 / prop_tgt / cuda_ptx_compilation.html /

CUDA_PTX_COMPILATION

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–2020 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.14/prop_tgt/CUDA_PTX_COMPILATION.html