HIP language support lacking compile_commands.json support
Files compiled with HIP language enabled (.hip
extensions) are not referrenced in the generated compile_commands.json
when CMAKE_EXPORT_COMPILE_COMMANDS is activated. I can provide additionnal details like a small reproducer if it is not an already known issue (I wasn't able to the test latest cmake version).
As an unrelated note, the HIP porting guide advise using .hip.cpp
file extension but the default extension used by the cmake HIP language is .hip
. It doesn't seem possible to change this behavior for all HIP files by changing CMAKE_HIP_SOURCE_FILE_EXTENSIONS
because cmake still identifies .hip.cpp
source files as C++ afaik.
$ cmake --version
cmake version 3.21.2