Early Access Program News

CLion 2022.3 EAP: Compile and Run for Single Files and a New UI

A new CLion 2022.3 EAP build is available!

Download build 223.7401.10 from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu). Update via patch if you are using the previous EAP build.

DOWNLOAD CLION EAP

Option to run single files

If you have a CMake or Makefile project, opening it in CLion is quite straightforward; you just point the IDE to the top-level directory or top-level CMakeLists.txt or Makefile file and select the option to open it as a project. CLion loads the project model and extracts the compilation flags from it in order to correctly parse, build, and run the code. However, if you are just getting started with the C or C++ language, you may have just one or two C++ files that you write code in and then want to compile and run. The concept of the project model might seem too complex and redundant for you in this case.

We want to assist developers who are starting to learn C and C++, so we decided to implement a flow that will simplify project configuration and setup in CLion. The option to compile and run a single C or C++ file in CLion is our first step towards this goal.

Let’s open a C++ file via the Open action in the Welcome wizard (you can also open a folder with one or several C++ files in it via the same action):
Open single file

As you can see, we don’t have a project model. However, notice the run icon in the left gutter that allows you to run or debug the current file.
Run icon

If you now click Run there, a Run/Debug configuration of a new type (C/C++ File) will be created for you automatically. This configuration allows you to quickly configure the toolchain, source files, and compilation options. You can also create this configuration manually via Add New Configuration:
Configuration list

When created, it allows you to compile and run the selected files. As my file requires the C++20 standard to compile, I need to add this option to the default configuration:
Compiler option

Now I can compile and run my file in CLion:
Compile and run single file

I can also debug my file. CLion will automatically add the required compiler flags for generating debug information (i.e. -g for GCC and Clang, or similar options for MSVC), so no changes in the configuration are required.

Important notes and known issues

  • If you open a single C/C++ file in CLion and create a C/C++ File configuration, it will be stored in the temporary directory. After your system restart these directories are removed.
  • If you open a folder with one or several C++ files in CLion and create a C/C++ File configuration, the information will be stored in the .idea directory inside your folder. You can re-open this folder later and get all your configurations working.

In the Run C/C++ File configuration, the Default toolchain is preselected, but you can change it to another one. Note that CLion uses cc and c++ compilers on macOS and Linux and cl.exe on Windows by default. To change that you can use Additional options | Compiler path field in the run/debug configuration. Docker and remote toolchains are not supported.

Do you think this feature will be useful to you? Give it a try and let us know what you think.

New CLion UI available via a setting

Earlier this year, we started a preview of the new UI for our IntelliJ-based IDEs. The main goals of the UI change were to reduce visual complexity, provide easy access to essential features, and progressively disclose complex functionality as needed. The key changes in the new UI are:

  • Simplified main toolbar
  • New tool windows layout.
  • New Light and Dark color themes.
  • Updated icon set.

This resulted in a look and feel that we believe is clean, modern, and powerful. Given the millions of current users of our IntelliJ-based IDEs, we want the rollout process for the new UI to be gradual and feedback-driven.

In CLion, we spent some extra time polishing C and C++ specific tool windows and features so they would work smoothly in the new UI. Today we are ready to announce that the new UI is available in CLion!
New UI look

We invite you to switch to it in Settings/Preferences | Preferences | Appearance & Behavior | New UI. Give it a test drive and share your thoughts about this huge change with us.
New UI setting

You should also feel free to check out the recording of the webinar about the new UI recently held by our IntelliJ Platform team – New UI: A Glimpse at the Future.

The full release notes are available here.

A reminder about what has already been delivered in the CLion 2022.3 EAP:

Download the latest EAP build to give the new features and enhancements a try, and be sure to share your feedback with us! EAP builds are free to use.

DOWNLOAD CLION EAP

Your CLion team
JetBrains
The Drive to Develop

image description

Discover more