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.
请先登录再写评论。
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.
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.
Here is the feature request: https://youtrack.jetbrains.com/issue/CPP-494.
Feel free to comment and upvote. Follow to get the updates.