enable_language(CUDA) and long command lines on windows

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

enable_language(CUDA) and long command lines on windows

JR Cary
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
a cxx

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
solve that
with an external file specifying the link, as is done without

Thanks....John Cary

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
build, as
they were linking to plain old cudart.

b) To get reconfiguring to work, I had put


to get auto-reconfiguring to work.


Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe: