meson generates a compile_commands.json, but since meson builds in subdirectories the directory+file parameters have relative paths that
trunk check
doesn't know how to follow:
{
"directory": "/home/apwillia/local/sync/openbmc-sources/sdbusplus/builddir",
"command": "ccache c++ -Itest/test-utility_type_traits.p -Itest -I../test -I../include -I/usr/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -Werror -std=c++20 -O2 -g -DBOOST_ASIO_DISABLE_THREADS -DBOOST_ALL_NO_LIB -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_COROUTINES_NO_DEPRECATION_WARNING -DGTEST_HAS_PTHREAD=1 -MD -MQ test/test-utility_type_traits.p/utility_type_traits.cpp.o -MF test/test-utility_type_traits.p/utility_type_traits.cpp.o.d -o test/test-utility_type_traits.p/utility_type_traits.cpp.o -c ../test/utility/type_traits.cpp",
"file": "../test/utility/type_traits.cpp",
"output": "test/test-utility_type_traits.p/utility_type_traits.cpp.o"
},
I tried to hack up my compile_commands.json with some
sed
calls and I can almost get it working but it is a challenge to get all the -I directives fixed up.
Can you improve
fmt check
to follow those relative paths from meson also?