Does sonarqube support cmake?

Hi Team,

I didn’t see cmake compiler in the list of supported compilers. Does sonarqube support cmake compiler for c++ code analysis?

Hey there.

CMake is not a compiler – it’s an orchestrator of the build process which includes calling the compiler.

So the real question is – what compiler is Cmake calling in your build?

1 Like

Thanks for your reply, so say cmake uses make internally.

Make is also not a compiler.

I think most Makefiles use gcc by default, but you can check the actual makefile to be sure.

1 Like

Sorry, Here is the correct information.

cmake .
– The C compiler identification is GNU 8.5.0
– The CXX compiler identification is GNU 8.5.0

Compiling the C compiler identification source file “CMakeCCompilerId.c” succeeded.
Compiler: /usr/bin/cc

Then you should be good to go. :slight_smile:

  • Any version of Clang, clang-cl, GCC, and Microsoft C/C++ compilers