Tools

How to avoid full compilation for a small change in header file in C

Sometimes it is very annoying to wait for full compilation when a small and non-invasive change is made in a common header file that is included by many C files. This typically happens due to header file dependency rules. If you are sure that your change doesn’t really affect other C files expect a few, you change the time stamp of the modified header to a date in past. Also you should change the time stamp of affected C files to current. This ensures that no other files compile except the ones for which you changed the time stamp.

Identifying the More >