1
votes

I am working with Eclipse Luna with CDT plug-in. Whenever I build the project it keeps rebuilding all files, even if I just modify specific .cpp file. I use project -> build project for the build. I also removed build automatically option (and re-opened eclipse), but it did not solve the problem.

I've searched a lot for similar questions, but found none.

2
Is this the answer for your question? link - GAVD
Hello, Can you please help me understand what is wrong with my question. - davidgrandson
No. That is not the answerto my question. removing build autiomatically (which I already did before) did not help. - davidgrandson

2 Answers

0
votes

Are you using a manually-managed Makefile project, i.e. one that is not automatically-managed by the CDT plugin? If so, perhaps you could post your Makefile contents here, because there may be issues with the target dependencies in it.

0
votes

The File | New | C++ Project | Executable option creates a project in which CDT automatically creates and updates the Makefiles itself - in this setup, the dependencies (while not perfect, because there are a few bugs in CDT in this respect) should be managed well enough so that it won't rebuild the entire project just because one file changed.

On the other hand, if you imported an existing project via the menu File | New | Makefile Project with Existing Code (which I didn't previously mention), then you would have had to copy the Makefile from the existing project manually, as CDT doesn't copy it for you, or you would have had to manually create a Makefile.

As I mentioned previously, if you posted your Makefile (feel free to 'sanitise' it by removing any personal information), we might be able to determine why it's rebuilding all files when you've only updated one of them.

I would have posted this as a comment reply to your last comment, @davidgrandson, but apparently there's a fairly short limit on the length of these.