Compile only modified files with nmake
I am trying to modify this big program which takes almost 10 minutes to co开发者_开发百科mpile using nmake.
Now if I modify one or few of the .cpp files, nmake is smart enough to compile just those that are changed and not the rest of the project. But if I modify the header files I have to compile the whole thing again. Is there anyway to avoid that?
Nmake is right in recompiling everything that depends on a header. Only a decent compiler or parser of the language you chose is able to judge if any data layouts changed.
If Nmake would not do this, the probability is high that you soon would step into the world of segfault and bus errors.
The proper way around is to organise your headers more cleanly and only include what you need.
精彩评论