CLion 2021.1 EAP: Clazy Analyzer, Better Makefile Projects Support, Sharing CMake Settings in VCS
The CLion 2021.1 EAP program is underway and we’ve already introduced Global Data Flow Analysis, Google Sanitizers, Valgrind Memcheck, Code Coverage in remote mode, CMake 3.19, and more.
Today we’re releasing the CLion 2021.1 EAP2 build, with even more new features for you to preview.
Build 211.5787.12 is available from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu). Note that if you are on macOS, there is a separate build for Apple Silicon (M1 chip).
- Clazy: CLion now has a Qt-oriented static code analyzer.
- QtCreator keymap.
- Makefile plugin is now bundled.
- Use compilers from toolchain during Makefile project resolution.
- You can now share CMake options in VCS.
- CMake Profile Wizard is added.
- Go to declaration performance improvements.
- A new inspection: catching unmatched header guards.
In CLion 2020.3 we added more sophisticated support for Qt projects that included code completion for signals and slots, Qt-style auto-import, and some Qt projects and Qt UI class templates. We’re not stopping there!
In this EAP we’ve integrated Clazy, a Qt-oriented static code analyzer, into CLion. We did it in the same way we implemented the Clang-Tidy integration, meaning checks appear in the editor similarly to how they are displayed in CLion’s own static analyzer:
Clazy is integrated into CLion’s own language engine based on Clangd, and the version currently used in CLion is 1.8.
In Settings/Preferences | Editor | Inspections | C/C++ | General | Clazy settings you can configure CLion’s severity level and the level of Clazy checks:
If you’re coming from QtCreator, you’ll be happy to know that CLion now bundles the QtCreator keymap. You can switch to it in Settings or via a Quick Switch Scheme action:
The Makefile Language plugin (previously 3rd-party) is now maintained by the CLion team and is bundled into CLion and GoLand in 2021.1 EAP:
You no longer need to install the plugin manually, so you now get
make syntax highlighting, quick documentation, Find Usages for targets, and some navigation and code completion actions for Makefile right out of the box!
When loading a Makefile project, CLion now not only uses the
make executable from the Makefile Toolchain, but also takes compilers from it (if configured explicitly in the corresponding Toolchain). This renders our Makefile project support more consistent and accurate.
CMake Profiles, which are used when building projects via CMake, can be configured in Settings/Preferences | Build, Execution, Deployment | CMake in CLion. These settings are now stored in cmake.xml in the .idea directory and can be shared in the VCS along with the project. Simply tick the Share option in the settings. This new ability makes it much easier for the team to share a single CMake setup between all members!
Users can have both shared and local profiles (local profiles always go first in the list of profiles in settings) and switch between them in the editor.
- CMake Profiles with the same name are not allowed. If a shared and a local profile both have the same name, the local profile takes precedence and the shared one won’t appear in the settings.
- Only CMake Profile settings can be shared. The “Reload CMake project on editing CMakeLists.txt” setting is common for all profiles and is stored in workspace.xml.
CLion now comes with a CMake Profile Wizard which helps users configure Toolchains and CMake Profiles for the first time. Depending on whether the project has previously opened, the process may include the following steps:
- The Toolchains step is shown only if CLion is being launched for the first time and settings were not imported.
- The CMake profiles step is shown if the project is opened for the first time (i.e. if the .idea directory is missing) or if workspace.xml or cmake.xml is missing in .idea or all the profiles are disabled.
It’s worth mentioning that closing the Toolchain/CMake wizard automatically saves all the introduced changes.
Improved navigation performance for the Eigen library
The most widely used navigation action, Go to Declaration, now works faster in the Eigen library (CPP-15082).
Catching the unmatched header guard
We’ve added a new static code analysis check to catch situations when the comment at the
#endif preprocessor directive doesn’t match the macro name from the
The full release notes are available here.
Your CLion team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
The CLion 2023.3 Early Access Program Is Open
We recently shared our preliminary plans for v2023.3, which we plan to release at the end of November. We are now happy to announce that the CLion 2023.3 Early Access Program (EAP) starts today! Our EAP lets the community participate in discussions devoted to our products and influence the developm…
CLion 2023.2.2 Bug-Fix Update
The CLion bug-fix update 2023.2.2 is now available! The fixes included in this bug-fix update are listed below. Download build 232.9921.42 from our website, through the Toolbox App, as a snap package for Ubuntu, or via a patch from inside the IDE. DOWNLOAD CLION This update’s main highlights includ…
CLion 2023.2.1 Bug-Fix Update
The CLion bug-fix update 2023.2.1 is now available! If you haven’t yet upgraded to v2023.2, now is definitely a good time to do so! The key enhancements in the major 2023.2 update include: The Beta version of AI Assistant is now available as a plugin with limited access. Streamlined integratio…