Sonarqube developer 8.2 cmake integration

Hi community,

I’m currently evaluating the Sonarqube 8.2 developer edition to test a Project which is made with QT c++ and cmake. I didn’t find anything in the documentation about cmake, is it supported and if yes, how does the setup for a scan work?

Thanks in advance,
Dennis

Hello @Dennis_g,

Welcome to the community!

The build system that you are using doesn’t matter as long as you are using a supported compiler. From the Doc:

Add execution of the Build Wrapper as a prefix to your usual build command (the examples below use make , xcodebuild and MSBuild , but any build tool that performs a full build can be used

So for cmake I would expect something like:

   mkdir build
   cd build
   cmake ..
   cd ..
   build-wrapper-linux-x86-64 --out-dir bw-output cmake --build build/
  • Use build-wrapper-win-x86-64.exe instead of build-wrapper-linux-x86-64 if you are on windows.
  • Make sure that the build is cleaned before each run because build-wrapper needs a full build.

Thanks,