Hi Julian,
You should’ve added this to CMakeSettings.json . But because you’re using CMakePresets you do not have this file.
A workaround would be adding the “CMakeSettings.json” for just SonarLint and maintaining it alongside with the “CMakePresets.json”.
According to Microsoft Docs if both CMakePresets.json
will take precedence for configuring the build. The dummy CMakeSettings.json
is just there to allow SonarLint to find the compilation database. (see table below)