Analysis of different C/C++ code variants in the same SQ project

We are using SonarQube Enterprise edition v8.9.6 through Azure Pipeline builds in Azure Devops Server 2019.
We are building C/C++ software in several variants that means we compile different binaries based on almost the same set of source code but compiling it in different ways with different compilation defines.

As long as I know, this concept is not managed by SonarQube so far.
When analysing the code based on the compilation of the different variants, the last analysis overwrites the preceding ones.

We worked this around by providing a different parameter value so that the analysis of the different variants appear in SonarQube under different branches.
This works quite well except the synchronization of issue status accross branches.

We would like to proceed the same way for PR analysis but the parameter is not accepted for PR analysis.
Is there a way to achieve this ?
Thinking further, this may shift the problem to the PR decoration in Azure Devops…

Or maybe there is another better approach for managing our variants in Sonarqube ?
Better would be to have this feature managed natively by SonarQube :wink:

Note: We will migrate shortly to Azure Devops Server 2022, to Azure Devops Services and to SonarQube 9.9 LTS.

Hey there.

A feature for this purpose is expected to arrive in SonarQube v10.1, so hold tight and start working on your upgrade(s)!

Happy to read that !
Don’t hesitate to share info on the feature as soon as they are available.