If you didn’t see – last year we introduced support in SonarQube Server for a feature called C/C++ AutoConfig! Removing the question of using a compilation database altogether.
This is available in SonarQube Server v10.6+, although you should really target at least v2025.1.
All said, you can continue to reference the workaround in the ticket Massimo mentioned.