CUDA: inconsistent format of `-isystem` for NVIDIA nvcc
For cmake generated system include search paths, it is -isystem
for gcc
/clang
/lcc
, etc, but -isystem=
for NVIDIA nvcc with the additional =
character. Why there is an inconsistent?
It cause some code analyser which use compile_commands.json
fails as -isystem=somepath
is unrecognized.
- cmake source code:
gcc: -isystem
clang : -isystem
but nvcc:
cmake's cuda:-isystem=
- reference:
Both
gcc
and NVIDIAnvcc
say-isystem
. But-isystem=
format is not mentioned:
official NVIDIA nvcc compiler: -isystem
official GNU gcc compiler: -isystem
So, cmake
should comply with the official documentation strictly, otherwise it may cause some tricky situation for other code analyser tools.
Edited by YantaoZhao