Commit ce3f3b6
committed
[cmake] drop CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES injection on device sources
Forwarding the host compiler's implicit include directories as
per-source `INCLUDE_DIRECTORIES` causes CMake to emit them as `-I`
flags, which:
- duplicates paths the host compiler discovers implicitly (no benefit);
- on `btas_um_tensor.cpp` (a CPU .cpp that ends up in the device list)
re-passes `/usr/include/c++/13` etc. as user-include paths, which
breaks libstdc++'s `#include_next <stdlib.h>` from `<cstdlib>` under
gcc-13: the search never reaches the system `/usr/include` because
it's been shadowed by the user-include re-entries.
nvcc with `-ccbin=g++-N` already picks up host paths via the host
driver, so the injection is unnecessary on modern toolchains.
Failure observed in CI with gcc-13 + CUDA 12.x:
/usr/include/c++/13/cstdlib:79:15: fatal error: stdlib.h: No such file or directory1 parent 9e6d444 commit ce3f3b6
1 file changed
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | 280 | | |
287 | 281 | | |
288 | 282 | | |
| |||
0 commit comments