enable_language(CUDA) and long command lines on windows
Porting our cmake build system to use enable_language(CUDA). This is a
computational application that make use of many libraries. Upon doing this,
add_executable ended up generating a link line of 9455 chars, causing
cmd to fail to execute it. In addition, the final link used nvcc instead of
cl, as used to be the case, even though the one and only source file is
Had a similar problem in creating shared libraries.
So my questions are:
1. How can I force the use of link.exe instead of nvcc.exe with
2. If that does not solve the problem of long link lines, how can I
with an external file specifying the link, as is done without
PS: In case anyone finds this of use...
a) I had to remove cudart_static from
CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES to get my windows shared libs to
they were linking to plain old cudart.
b) To get reconfiguring to work, I had put
set(CMAKE_CUDA_COMPILER_ID_RUN FALSE) # Workaround