What is the best IDE for CMake (C/C++) developers?

This is a subjective post of course but I’m curious about the development environment and IDE’s people use with CMake.

Personally I’ve only really been Visual Studio 16 2019.

But I’d like to learn more about what other people are using.

2 Likes

I’m using Visual Studio Code (not equal to Visual Studio) with CMake & C/C++ plugins.

That solution is cross-platform (Windows, macOS, Linux).

3 Likes

I quite like CLion, which uses CMake as its oldest/most mature project system. As a C++ IDE it’s great, but it could use some nicer features when editing CMake code. Like VS Code, it’s also cross platform. I personally find it to be a lot more polished than VS Code, however.

3 Likes

Long-time Qt Creator user for me personally. It is also cross-platform, has been around for quite a while and is actively developed. With Qt having switched to CMake as their primary build system for Qt6, the CMake support in Qt Creator has improved in recent times.

2 Likes

“Best” is obviously always very suggestive. I personally use and really like CLion. I have been using Jetbrains other IDEs for years (especially for Java development) so it feels right at home. And what I like the most with CLion is that it handles CMake natively so it is very convenient. You just open your CMake based project and CLion will do the right thing…

2 Likes

For CLion: CMake simple highlighter and CMake Plus plugins may help with extra highlighting, navigation, hints and code-completion support.

I have used (in not particular order):
Visual Studio (since 2013)
VS Code (for a long time now…)
QtCreator (since version 3)
CLion (since mid 2021)

My main OS is macOS though I need to use Linux and Windows on a weekly basis to double check stuff so I stay fluent enough in all of them.

There are bits about each one that I like and dislike. Currently, CLion has my money for 90% of my C++ development. CLion is pretty fast, navigation and refactoring is great, clang-tidy and clang-format is well integrated, Catch2 unit test is well integrated. On macOS and Linux though debugging Qt code is basically impossible as you cannot see the Qt variables. That is when I switch to QtCreator for that part of the debugging experience. CLion on Windows has the Qt 'natvis" so one can see the Qt based variable values, but then on Windows with CLion there is no console output (std::cout << … ).

That is my 2 cents about the IDEs that I use on a regular basis.

For me two options are the best:

  1. neovim with plugins
  2. VS Code with extensions