Early Access Program News

CLion 2022.1 EAP6: CMake Presets, Improved CMake Scripts Formatting, and Other Fixes

The new CLion 2022.1 EAP build, 221.5080.52, is now available from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu). Please note that if you are on macOS, there is a separate build for Apple Silicon (M1 chip).

Those of you already using the EAP5 build can apply a patch to update to EAP6.


CMake updates

CLion now automatically creates CMake Profiles for configure presets (this was only available for build presets before). This change makes the configuration process easier and lets you remove redundant build presets.

Configure presets in CMake

CLion now also works with the --preset argument passed to the cmake command. The data from the preset is loaded into build type, toolchain, and build directory settings.

CMake v3.22 has been bundled into CLion.

CLion now notifies you when something has changed in the environment and the changes require clearing CMakeCache.txt and reloading the project:

Environment change

The notification is typically shown after you update Xcode on macOS and your compilers are no longer available at their previous paths. Something similar might also happen for MSVC and MinGW.

CMake scripts are now formatted more accurately:

  • if() .. endif(), else() and elseif(), endforeach(), endfunction(), endmacro(), and endwhile() are aligned correctly.
  • It is now possible to fold blocks for these commands.
  • Brace pairing and code block highlighting are available for these commands as well.

CMake Formatter

Other highlights

The build also includes fixes for the following issues:

  • False positives occurred in Data Flow Analysis for function calls located inside parentheses (CPP-28122).
  • The auto keyword was highlighted incorrectly when a trailing return type was used (CPP-28440).
  • A wider context than necessary was considered by the Rename refactoring when renaming a local variable (CPP-23257).
  • Various issues in code completion (CPP-27816, CPP-27318, CPP-22156).
  • Broken highlighting and run icon for Boost.Test 1_69_0 (CPP-28254).

The full release notes are available here.


Your CLion team
The Drive to Develop