Reputation: 2243
Is it possible to have eclipse index my C++ code (built using cmake)?
I prefer to compile/run the actual code using a bash prompt, but I would like to write code in an editor like eclipse so I can easily follow definitions and have auto-completion.
I'm worried the C++ indexing in eclipse will become out of sync at some point because I'm compiling outside.
Right now the method I'm using is this method: cmake -G"Eclipse CDT4 - Unix Makefiles"
which appears to work, but it seems like this method also causes eclipse to rebuild my project when I import it in.
Upvotes: 2
Views: 1501
Reputation: 2185
Yes, I currently use Eclipse as an editor with its index on a project that is built outside of eclipse. Just turn off all the automatic build options in the project, and it will still index the code for you whenever a file changes. My project uses a bunch of special scripts to perform the build, so I just left it as a default c++ project from existing code, using the CDT builder when I created the project.
Upvotes: 1