CLion EAP news: CMake features and bug fixes

Hi everyone,

CLion EAP, build 141.351.4, is available for download. Let’s have a short overview of the changes and fixes.

CMake comments and commands completion
Several improvements were introduced for CMake. First, CLion now supports CMake 3 bracket-arguments and block comments syntax. Second, since this build comment line/comment block CLion features are available for CMake as well. To comment a line in CMakeLists.txt you don’t need to select it – simply put the caret in there and press Ctrl+/(on Windows/Linux), Cmd+/ (on OS X):
To comment a block you need to select it and press Ctrl+Shift+/(on Windows/Linux), Alt+Cmd+/ (on OS X):

Another exciting feature is CMake commands completion! Start typing the command name to get the list of matching suggestions. To save even more time, enter just the first letters of the name’s parts for Snake case matching or even any part of the command name (Middle matching):

Code style settings
To better match the Google C++ style guide (which we consider a reasonable default for C/C++ code), CLion now wraps and aligns long list of function parameters, call arguments and initialisers by default. If you prefer other settings feel free to change them in Editor | Code Style | C/C++.

Fixes for auto-include feature and Rename refactoring
In this EAP we’ve fixed two sets of frustrating problems. First one addresses the auto-include feature:

  • Incorrect include added when auto-complete a variable that has the same name as another variable in the global scope (CPP-1057).
  • Incorrect auto-import of OS X frameworks (CPP-1099).
  • Incorrect auto-import in case of refactorings (CPP-1447).

We still know the cases when auto-import behaves in a wrong way and thus going to continue the work. Of course, feel free to report new problems with auto-include to us.

Another set of fixed problems is about Rename refactoring.

  • Problem with Rename refactoring invoked on constructor call (CPP-2239).
  • Problem with Rename refactoring for std containers (CPP-2240).

Build and Run Configurations fix
In Run | Edit Configurations dialog you can as usual add another configuration before the current one. Still now in case the configuration is non-executable CLion reasonably won’t attempt to run it.

Java updates
We’ve bundled Oracle 1.8u40 JRE on Linux to make CLion installation easier. In case you are not happy with it, feel free to set the path to other JRE to CL_JDK environment variable.

And for our OS X users we have even more exciting news! You probably know that we do recommend Apple JDK 1.6 because of the critical issues with JDK 1.7 and JDK 1.8. But with update to OS X 10.10 users noticed a very annoying issue with graphical glitches. Recently we’ve started our work on custom build of JDK 1.8 with fixes by JetBrains team. Thus a new distribution package targeting OS X Yosemite users experiencing graphical glitches with Apple JDK is here! If you got used to JDK 1.8 you can try this as well – some fonts anti-aliasing problems were addressed there. And of course we do really appreciate your feedback, comments and issue reports here – the work is still in progress.

Many small fixes in parsing and resolve were introduced in this build as well. The full list of fixed issues can be found in our tracker.

Yours as always,
The CLion Team

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

23 Responses to CLion EAP news: CMake features and bug fixes

  1. wl.nicholas says:

    So the final release is not so far away any more. :-)

  2. Anton says:

    Font rendering is different (I found it bad) in this release. Have you changed something?

    • Anton says:

      The fonts are too sharp and look different from other applications. I forgot to notice, I’m talking about font rendering on Linux. I hope the changes were made in clion64.vmoptions, but I can’t rollback them right now (need to compare with previous version).

  3. rsy says:

    To better match the Google C++ style guide (which we consider a reasonable default for C/C++ code),

    Please don’t consider Google C++ style guide to be a reasonable default. It is horrible for new C++ projects.

  4. Jack says:

    Makefile really should be supported.

  5. Yury V. Zaytsev says:

    “Your as always” -> s/Your/Yours/ 😉

  6. Yury V. Zaytsev says:

    The red box during Rename refactoring reappeared in this EAP :-) Yay!

  7. Sebastian says:

    I am using CLion for C projects with GTK and Glib. I found that there are two Macros GTK_Is_WIDGET and g_return_if_fail are marked red by CLion if tough they are actually correct. Is there a bug for these kind of errors?

  8. Michael Hofmann says:

    I would not consider the Google C++ style guide a reasonable default for developers. Nope… not by a long shot.

  9. Eric says:

    Hi, thanks for your hard work on CLion.
    Thanks for fixing bug CPP-1057, but please consider also having a way for users to TURN OFF auto inclusion (this suggestion is separately tracked as CPP-2044.) It may seem like overkill to turn it off, when you think that it now works perfectly, but without UI guidance I am worried it may continue to cause problems.
    This bug affects the whole team and not just the individual CLion users. In my company it is common for a CLion user to check in code that got an extra include file added, thus breaking the build for the entire team on other platforms that don’t have that file. For example this week it was CFNetwork.h, part of Apple Core Networking.

    • Anastasia Kazakova says:

      Thanks for your feedback, Eric. We are very sorry about it and continue our work on this feature, still we’ll consider your suggestion for sure.

      • Jason says:

        Auto-import of includes is proving to be a deal breaker. It is constantly tripping up my development team when they go to compile, and there’s extra headers that cause weird spurious errors while building that we’ve never seen before.

        Please make this an option we can disable. My group uses IDEA and Pycharm without problems; we hope we can continue to use Clion as well, but at the moment it’s not worth using a tool that is going to give us build headaches and random failures.

        • Anastasia Kazakova says:

          There is actually an option now – Editor | General | Auto-import. So switch if off there. The pop-up with include suggestion won’t show up in that case, though you’ll still be able to invoke an auto-import when necessary using an intention action (Alt+Enter). Mind several possible cases when completion finds symbols in wrong headers – if you accept such a completion, the wrong header will be included. However the latest case is not happening that often and most probably switching the option off will help you.

  10. Marc says:

    Seems it doesn’t work with a student account :(

    • Anastasia Kazakova says:

      CLion will be available with student license after 1.0 release automatically.
      Now you can start the evaluation period.

Leave a Reply

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