CLion Starts the 2022.2 EAP: Colorized Ninja output, Embedded GDB Server Wizard, Updated CMake Presets Integration
The CLion 2022.2 Early Access Preview program starts today!
Give the free EAP builds a try and let us know what you think about the changes! Share your feedback in the comments or submit it to our issue tracker.
Build 222.2270.30 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).
Here are the main highlights:
- Colorized output for Ninja generator is now enabled in CLion.
- A new wizard was added for Embedded GDB Server run configurations.
- Code analysis and refactorings became more accurate.
- Code completion was improved.
- CMake Presets integration got updated.
Colorized Ninja output
Colorized compiler output helps dealing with compilation errors much faster. That’s why we contributed to CMake and implemented a way to enable colorized output for the Ninja generator in CMake in CLion by default. The change is now in CMake master and will be released as a part of the 3.24 release of CMake. It introduces the CMAKE_COLOR_DIAGNOSTICS CMake variable that controls the following:
- Whether CMake should enable colored compiler diagnostics via compiler flags.
- The CMAKE_COLOR_MAKEFILE variable.
Additionally, we added support for the CMAKE_COLOR_DIAGNOSTICS environment variable, which controls the default value for the CMAKE_COLOR_DIAGNOSTICS variable. CLion now always adds the CMAKE_COLOR_DIAGNOSTICS=ON environment variable when re-loading the CMake project. This ensures that there will be colored diagnostics for both Ninja and Makefile generators.
Note, that the default bundled CMake version is 3.22 for now. To get the colorized output, you need to build CMake 3.24 and use it in the CLion toolchain.
A new wizard for Embedded GDB Server run configurations
GDB servers are often used to debug on-chip. In CLion, you can use them by creating the Embedded GDB Server run/debug configuration. Previously, you had to create such configurations manually, but now there’s a wizard available for this purpose. This wizard helps with creating Embedded GDB Server run configuration with the predefined GDB server arguments corresponding to the GDB server type selected in the wizard settings.
Launch the new wizard via Run | New Embedded Configuration. In the dialog that opens, enter the configuration name and the preferred type of the GDB Server:
- Segger JLink
- QEMU emulator
- STM32CubeIDE ST-LINK GDB server
- PE Micro (OpenSDA)
When the GDB server’s expected name is found in PATH, the location of the server is resolved automatically:
Click Next and get the list of devices to select from:
After you click Create, you’ll get the Embedded GDB Server run/debug configuration created with the GDB server args set according to the wizard preferences. You can adjust the settings later if you want:
More accurate code analysis and refactorings
We’re continuing to make code analysis in CLion more accurate:
- “Condition is always true/false” message is not duplicated now when a constant variable is used in condition (CPP-21829).
- We optimized the way MISRA and Clang-Tidy settings from the UI are passed to the actual call (CPP-28568).
- We fixed a regression problem with the false Clang-Tidy warning shown for the TEST macros (CPP-28309).
- Make Clangd correctly recognize the
Code intentions and refactorings also got a few fixes:
- Intention Add braces to
forstatement no longer inserts an unnecessary semicolon and can now preserve the user’s comments (CPP-28879).
- The refactoring invert
ifcondition no longer results in broken code if the condition has an inverted macro (CPP-28620).
Improved code completion
We’re continuing to make CLion Clangd-based code completion more accurate and useful:
- Code completion no longer ignores namespaces inside templates (CPP-28297).
- CLion now suggests class names in the completion lists after the
- Do not show
__1namespace in completion list (CPP-29042).
- We improved the conversion limitations for postfix completion and brought them in line with the limitations that are used for smart completion (CPP-28630).
- CLion now doesn’t show the postfix completion for bit fields (CPP-25873).
In CMake, Qt-related commands were added to completion lists (CPP-28811):
When auto-creating CLion profiles for all the configure and build presets defined in the CMakePresets.json and CMakeUserPresets.json files, CLion now uses a new naming scheme for the CMake profiles created in CLion:
- Configure presets are imported with
- Build presets are imported as a
configure-preset-name - build-preset-namecombination.
We’ve also enabled a copy action for profiles created from presets so you can edit them in CLion.
Have you tried the CMake Presets integration in CLion? Feel free to share your feedback with us!
- To improve the performance of the compiler information collection in the case of Docker toolchain, CLion now uses docker
- Valgrind Memcheck no longer shows the incorrect error about the failed download of the specific files when launched in the remote mode.
- CLion now notifies users when Valgrind Memcheck is launched for the release configuration and the debug information is missing for the executable as a result.
Your CLion team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
CLion 2023.3 EAP2: Support for Device Tree Files and Meson
The CLion 2023.3 Early Access Program has just started, featuring assembly view for files, enhanced C++ data flow analysis, and other updates. The CLion 2023.3 EAP2 build is ready for you to try! With it, you can finally start working on Meson projects in CLion and benefit from device tree format s…
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…