Support for pre-existing makefile projects in CLion

Background:

I use Linux, and have a great editor for working on (C++) code, but this has little in the way of contextual help. I had tried Eclipse for a few months, but it's so awful that I stopped.

I'm considering using CLion for my projects, which are all makefile driven.

I've had a look around the main website, and here on the discussions, but can't find an answer to my questions.


The Questions:

Does CLion have support for makefile-based projects, without the need to re-write the makefiles as cmake files? It would be fine to have thin cmake 'wrapper' files around the makefiles. I would primarily like CLion to be able to gather all its symbol information, to be able to launch a build, navigate errors, and run debugging sessions. I would like the makefile to remain as a primary source, though I would not expect CLion to be makefile-aware to the extent of making automatic modifications to it; I'm happy for that to remain manual.

Is there a guide on how the set up from pre-existing makefile-based projects is done, either a document, web page or video?


Many thanks,
Rob.

1 comment
Comment actions Permalink

Hi Rob.

CLion now relies on CMake as a project model. It takes all the information about the project from CMake build system. All includes paths, variables and more is taken from CMake files and are used by CLion to understand your project better and to resolve your code correctly.

CLion still supports only CMake-based projects, but it’s able to create this CMake project from the existing sources. To give it a try press File | Import Project… or select an Import option on the Welcome wizard.
You can find out more information about this feature in our blog:
http://blog.jetbrains.com/clion/2014/09/new-clion-eap-build-import-project-from-the-existing-sources-toolchain-updates-and-more/

So while you can auto-import existing sources, any external or non-trivial dependencies wouldn't be resolved and used while indexing (you should set it manually), also CMake files would be produced in your source dir.

However we understand how popular and important Makefiles build system is. So we are going to support it in future versions.
Here is the feature request: https://youtrack.jetbrains.com/issue/CPP-494.
Feel free to comment and upvote. Follow to get the updates.
0

Please sign in to leave a comment.