Build-wrapper - multiple projects (modules)

SonarQube 6.7.7
build wrapper windows x64

Hello all,
I have a embedded project consisting of three modules. Each of the module is compilable separately. But together they create a firmware. The sources are in C/C++. The compiler used is arm-none-eabi-g++ or arm-none-eabi-gcc version 7.3.1.

My problem is, that sonar-scanner does not see parameter in module’s file.

I have compiled one of the modules (with build wrapper eavesdropping) and gathered defines, etc. and saved it to root/module1/res/sonarqube/bw_output. Generation was successfull.
Althoug it says:
when I am using arm-none-eabi-gcc. And what’s up with double slashes?

Then I save this path to modules sonar-project file as:
The properties file is saved to root/module1 directory

In main properties file (root/ I state I have one module (just for start):

After I run the scanner I can see that the module’s properties file is seen - because of source files found using sonar.sources=src. But it’s unable to see

I also trier do save output to module’s folder.

Only way to make this work so far is to save this property to main, but that is not a solution for me - I have to have separate modules with separate defines, etc.

My questions are following:
Main one:
Why cannot sonar scanner see in module’s properties file?
Extra: :slight_smile:
Why is there clang instead of GCC in BW’s output?
Isn’t it wrong to have double slashes in BW’s output?

Hi @peterko91,

the SonarCFamily analyzer is a global sensor which means that it runs only once, you simply have to provide only one property at project level, which implies that you have to call the build of the 3 modules from the same command, something equivalent to:

REM from D:\root
build-wrapper-win-x86-64.exe --out-dir bw_output build_all.bat

where build_all.bat contains:


and then call sonar-scanner with just one property, something like:

Implementation detail, GCC and clang compiler share the same cli interface.

No, blackslash character is the escape character, so it needs to be escaped itself.

3 posts were split to a new topic: CFamily multi-configuration analysis