CLion starts 2018.1 EAP: WSL support, C++17 if with initializer, CMake and project view changes

Hi all,

We are back from our holidays, and it’s time to start CLion 2018.1 EAP!

Our plans for this release are really promising and today we are happy to present to you a couple of great new additions to CLion:

Download CLion 2018.1 EAP

Using Linux toolchain on Windows in CLion

If you develop on Windows but use Linux toolchain to build your project, you can now use Windows Subsystem for Linux (WSL) development environment support in CLion. After configuring WSL on your machine, you can simply select WSL in Build, Execution, Deployment | Toolchains, provide proper credentials and that’s it! Here you can find a detailed blog post about the configuration details (including a special script that can help you to configure the WSL in case a Ubuntu distribution is used and a list of current CLion limitations and known issues). There is a short video which demonstrates the setup and a working sample:

C++ support improvements

If and switch with initializers from C++17

When you put an initializer before an if or switch statement, it pollutes the ambient scope, or you have to introduce an explicit scope to keep the code clean. C++17 allows adding an initializer to the condition in the if and switch statements, which is a much more accurate and cleaner solution. CLion now can parse and resolve such statements correctly:

Refactor hierarchies reliably

There was an issue with some rename and change signature refactorings that were not updating functions in other inheritance branches (so completely ignoring sibling functions). That made these refactorings unreliable in such cases. The issue is now fixed. For example, Rename updates all necessary functions in all branches:

And more

As a temporary workaround until some critical issues with Unused import statement inspection are fixed, we’ve disabled it in the default inspection profile.

Besides this, the build fixes an issue with the incorrect severity highlighting (CPP-1795, CPP-8301, CPP-11257). Now, if you change the severity of the inspection (Error, Warning, Weak Warning, etc.), the color in the IDE’s right gutter will be updated accordingly.

CMake changes: open single file/open folder, load CMake

The process of decoupling CMake from CLion has started, and now you can open any folder or file in CLion (use File | Open menu or Open option on a Welcome screen). Be careful, CLion still needs a project to properly understand your code and provide you with smart features (like navigation, completion, refactorings, etc.). However, if you wish to open some C/C++ files in CLion for simply reading the code, that will be enough.

CLion will notify you that the project is missing and will suggest loading the CMakeLists.txt file:

Note, that the CMake tool window and CMake tools menu won’t bother you until you load a proper CMake project in CLion – they all are hidden. When you select a CMakeLists.txt file, CLion will load it as a project file. If you select the wrong CMake file by mistake, you can always call Tools | CMake | Unload CMake project action.

There is also an important note about project root – when you load a CMake file into CLion, a directory containing this CMakeLists.txt is considered a new project root directory. You’ll see an IDE notification if it’s not matching your currently opened directory and you can change it via Tools | CMake | Change Project Root.

Alternatively, you can create a new CMakeLists.txt from scratch via Create New File (Alt+Insert on Windows/Linux, ⌘N on macOS):

For your convenience, there is a new file template for CMakeLists.txt file available in CLion, which you can edit in Editor | File and Code Templates.

Scopes in Project View and Find in Path

CLion 2018.1 EAP includes the ability to use scopes to filter the project view and limit a Find in Path search. CLion comes with a few predefined scopes. For example:

  • Project Files – all files within the project root, w/o the excluded folders
  • Project Source Files – Source files from the CLion perspective (all intellisense features work)
  • Project Non-Source Files – Files located in the project directory, that are not sources from the CLion perspective, which means files that are not included into the loaded CMake (intellisense features are disabled)
  • Problems – currently empty, will show analyzer errors later (CPP-11252)
  • Changes files – in case of VCS, all changed files

Users can also create their own scopes to use in the Project View and Find in Path.

By default, Project View opens Project, which includes all project files, including generated folder (like cmake-build-debug) and other excluded folders:

In the dropdown you can now select any predefined or custom scope:

In case you select any scope different from Project, in the context menu, the Edit Scopes action becomes available. It allows you to create and configure custom scopes:

You can use it later in Project view:

Mind that the colors have changed: source files became blue (previously not greyed out), non-source files now have regular colors (previously greyed out).

All predefined and custom scopes are also available in Find in Path to help you limit the search:

Performance improvements: incremental highlighter

When you edit code inside a small function body in a huge file, you will now notice a significant performance boost – CLion updates the file highlighting incrementally, and local changes (in a function body) don’t affect the whole file highlighting.

Objective-C/Objective-C++ support

In this EAP we enabled Objective-C/Objective-C++ support in CLion. Which means it’s now possible to work with files in these languages which are added to your CMake project. The following features are now available in CLion:

  • Full Objective-C/Objective-C++ languages support coming from AppCode
  • All Objective-C inspections from AppCode (with the except of clang analyzer set)
  • Key-value coding support
  • Objective-C live templates, as well as File and Code templates for Objective-C
    .m/.mm file extensions in the list of C/C++ source files extensions
  • Code style/color schemes, however one needs to enable this in the Registry in clion.enable.objc.settings


If you have Microsoft Visual C++ compiler installed on your machine, you can use it in CLion. And from now you don’t even need to turn on Registry setting for this. The functionality is available on Windows by default. Go to Build, Execution, Deployment | Toolchains to select VS development environment.

That’s it! Full release notes are available by the link. Download and try the build (181.3007.15) right now and share your feedback with us!

Download CLion 2018.1 EAP

Your CLion Team
The Drive to Develop

This entry was posted in Announcement, Early Access Preview and tagged , , , , , . Bookmark the permalink.

40 Responses to CLion starts 2018.1 EAP: WSL support, C++17 if with initializer, CMake and project view changes

  1. Henry Borchers says:

    Ooo! This looks neat. I can’t wait to try WSL support. Great job.

    I know it’s not a priority to implement the MSVC debugger but do you have any update on it? It’s pretty neat being able to use MSVC in CLion for when I need it (writing C/C++ extensions for Python for Windows) but without access to the debugger, it limits the use.

    Otherwise, I can’t have enough CLion in my life.

  2. Mike says:

    This is great! Super excited about WSL, and I’d also love to be able to use MSVC debugger. Also, if there’s any way to get MSVC projects to build in parallel, that would literally save me 30 minutes per day of sitting and starting at the Clion build log…

  3. Tano says:

    1. The “scopes” feature is not available for old (bug-less) “Find in Path”?
    I would be great to use the new ones, but I wait for the bugs to be fixed: IDEA-170658, IDEA-182269, IDEA-170662, etc
    Thank God you kept the old “Find in Path”, also.

    2. Also why the new Project arrow is so nicely placed on MacOS near the other icons and on Linux/Windows is in the middle of the bar? It’s the first time I see an icon in the middle of the bar and it’s ugly as hell.

  4. Kirill Sapozhnikov says:

    Thanks for release.
    CPP-7635 is a very debatable decision. Reconsider this please. There is already an issue CPP-11834. I am sure that user should decide whether to hide or not to hide build window.

  5. Arthur says:

    Great work !! And well done for WSL integration, are you working on enabling Clion’s valgrind features on Windows thanks to WSL toolchain, and if yes, what’s the current status ?

  6. Tano says:

    Are there Win 32-bit versions?
    I just downloaded CLion on my Win 32bit machine and it does not work.

  7. Jennifer Kuiper says:

    @Anastasia How do I create an Objective-C project? Or is that too far fetched?

  8. Jennifer Kuiper says:

    BTW, will Kotlin Native and Swift plugins be removed? They are not available now.

    • Anastasia Kazakova says:

      This is a temporary issue with the EAP versions of Swift and Kotlin/Native plugins. Stable/release versions are available. We are investigating the issue with the EAP.

  9. Gerry High says:

    Is there a fix to get Kotlin Native working in the EAP? I don’t see any options to create a new project in Kotlin.

    • Anastasia Kazakova says:

      For now, it’s not yet available. Will be restored in EAP in a couple of weeks. You can use it in the stable version for now (2017.3.3)

  10. Jakub says:

    Hey, i see WSL so i have question:

    When Remote SSH Run/Debug will be available ?

    My project run in jetson tx2 so develop from macOS will be great!


  11. Ernst says:

    wsl toolchain doesn’t work when ubuntu console is not started.
    I was previously working with VIsualGDB extension for Visual Studio –
    it didn’t require me to install ssh server there (actually no any manual step),
    it (extensioin) does even install there all required toolchains and tools
    and it didn’t require me to start and keep ubuntu/bash console.
    as I remember even app output was in VS debug output.

    I’d recommend your devs to look and try this tool for future own improvements in clion for wsl

    • Anastasia Kazakova says:

      Our implementation of WSL is a first step in the remote dev support direction, so we intentionally implemented it via ssh. This will be reused for remote dev in future.

  12. melon says:

    I think support toolchain from SSH likes eclipse-PTP is better than WSL, more simple and universal, don’t you ?

  13. cristi says:

    It would be nice if we could select the compiler we want to use for WSL. It seems for the moment we’re stuck with GCC 5.4 that comes by default and we’re unable to switch to a newer version (basically making the C++17 features useless).

  14. btel says:

    Is there any plan to release community edition like IntelliJ IDEA?

  15. Goktan says:

    “Performance improvements” -> easy to write but hard to achieve I guess.

    I am using the latest EAP and it is still slow, I mean unbearably slow and also recently started freezing other stuff on my computer.
    This is the case for a long time and many people around me are looking for alternatives as nothing gets better despite lots of complaints/tickets/provided logs/etc… so far.

    Maybe you should consider taking a break for features for a while and focus on making the product usable in the simplest form. I think pressing a key and seeing it appears on the screen without waiting 30 secs is the most important feature which an IDE should have.

    • Anastasia Kazakova says:

      We are working on performance constantly. But of course there are still cases when freezes happen (we can’t cover all types of projects and all issues at once, sorry we’d really love to, but that’s impossible; however we’ll be happy to check your case to see what’s going on there). Current performance improvements are focused around typing in the IDE. If you still experience freezes while typing, please send us the thread dumps generated automatically and located in the log directory (Help | Show Logs)

  16. Uwe Ehmann says:

    Still hugh perfomance problems using WSL. Are you really working on it?

    • Anastasia Kazakova says:

      What version are you using (CLion)? Performance problems mean “slow” or “freezes”?

      • Uwe Ehmann says:

        Version 2019.1.4

        It depends on the action if the IDE is slow or freezes:

        The IDE is slow when

        1. Resolving references, like finding usages, definitions and declarations.
        2. Code completion suggestions wrt. member functions and variables.

        The IDE freezes when
        1. Debugging using GDB and data of variables get inspected. A popup window indicates “Resolve operation requires more time…” which never disappears. After around 10 – 15s the IDE kind of unfreezes and the cancel button can be pressed.

        • Anastasia Kazakova says:

          First of all, do you see such issues on local (non WSL) projects?
          Also, could you please try with the recent stable release aka 2019.2.3? Or maybe even better with the recent 2019.3 EAP build (it’s free to use by the way)?

          • Uwe Ehmann says:

            I haven’t tried neither a newer build nor a local setup since a normal windows setup was no option for me. The issues appeared in projects where I used the C++ Eigen library as an include which is an extensive header only library. Projects without it went fine so far.

          • Anastasia Kazakova says:

            I would recommend you trying the recently released 2019.3. It includes many improvements for Eigen among others

Leave a Reply

Your email address will not be published. Required fields are marked *