CMake + Ninja + nvcc C++ linking fails because of response files in 3.18.1
Using CMake 3.18.1
, but not CMake 3.17.x
, I cannot get a working CXX compiler with nvcc_wrapper
(or plain nvcc
) because the response file syntax causes issues.
This seems to be the subject of many different issues and MRs in recent years, for example:
- !3482 (merged)
- !3399 (merged)
- #17644 (closed) (my errors look like these if I use plain 'nvcc' as the CXX compiler)
I've tried turning off as many response file-related CMake variables as I can, like CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS
(and the library equivalent, and so on). I also tried turning off CMAKE_NINJA_FORCE_RESPONSE_FILE
, but response files are still being used to link.
My immediate question is: is there a way for me to hard-enforce disabling of response files with a cache varible with CMake + Ninja and completely prevent the reactivation by internal CMake control flow?
"Unix Makefiles"
does not currently have this issue in the exact same environment, but it is far slower for us at the moment.