ccache make recompiling whole program again and again

0

I have two projects on Linux mint 16, I switch between. I am using ccache make so that i can compile only changes in the program but It is recompiling from scratch. build system is cmake. If I compile one project and then switch to another and compile it, After this ccache should recompile only changes as make will do as if I was working with only one project. But it recompiles from the scratch.

How to handle multiple projects with ccache? Is ccache really caching?

user166289

Posted 2014-07-14T16:03:52.260

Reputation: 186

It is common to have a tag file which is a dependency of everything in a make file, so that touching it forces a complete rebuild, often with a name like rebuild.all. Maybe your make files have a common rebuild tag file name. – AFH – 2014-07-14T17:15:26.503

So, I should remove that phony target? – user166289 – 2014-07-15T05:52:04.140

No, just change its name throughout the makefile on one of the projects. – AFH – 2014-07-15T17:46:33.240

No answers