CUDA language cannot pass multiple -Xptxas arguments
Currently, -Xptxas
is not handled correctly with the CUDA language in CMake 3.8rc2. Something like this:
enable_language(CUDA)
...
set(MY_CUDA_FLAGS -Xptxas -fmad=true; -Xptxas -dlcm=cg; -Xptxas --opt-level=4)
set_target_properties(my_CUDA_header_lib
PROPERTIES INTERFACE_COMPILE_OPTIONS "${MY_CUDA_FLAGS}")
or
target_compile_options(my_CUDA_header_lib INTERFACE "${MY_CUDA_FLAGS}")
Fails by removing the second and third -Xptxas
, which invalidates the flags.