List expansion is inconsistent for different platforms on on cuda
cmake-3.10.2, Ubuntu LTS 18.04, ninja generator. Also tested using latest release (3.12.1).
I have a target which does the following command:
set(CMAKE_CUDA_FLAGS "-gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_70,code=compute_70")
This works on linux, but fails to compile under visual studio. If I change it to
set(CMAKE_CUDA_FLAGS -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_70,code=compute_70)
It works on neither platform. It does work though if I use target_compile_options on windows, but I cannot do that on linux due to #18265 (closed) I would assume that in particular the second option should work on both platforms
A backport to 3.10 so that the distros can pick it up would be appreciated.
Edited by Benjamin Schindler