Commit eb4f41c
authored
[CMake] Show NVCC include directories in compile_commands.json (#17079)
As of cmake 3.29.5 [0], if the NVCC version is 11 or higher, cmake
will generate a "options-file.rsp" containing the -I flags for include
directories, rather than providing them on the command-line. This
setting exists to work around the short command-line length limits on
Windows, but is enabled on all platforms. If set, because include
directories are not part of the `compile_commands.json`, the clangd
LSP cannot find the include files.
Furthermore, this override cannot be specified in a user's
`config.cmake` for TVM, because it must be set after CMake's built-in
CUDA support.
This commit updates TVM's `CUDA.cmake` to override the
`CMAKE_CUDA_USE_RESPONSE_FILE_FOR_INCLUDES` variable, to avoid this
issue.
[0] Kitware/CMake@6377a4381 parent cc7eb2f commit eb4f41c
1 file changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
33 | 53 | | |
34 | 54 | | |
35 | 55 | | |
| |||
0 commit comments