2 ms·
The checksum issue could be addressed by having the compiler generate the checksums in a "sidecar" file and have the build system depend on those. Obviously th
by gumby 8y ago
The checksum issue could be addressed by having the compiler generate the checksums in a "sidecar" file and have the build system depend on those.
Obviously this faces the "not every toolchain will support this" but you could have a switch to use checksums and continue to use the older approach by default.
You would have to call cksum instead of touch in your Makefile.
With a modules system (like C++20 is trying to embrace) you could in theory generate a vector of checksums (with subranges in the file) for each file and only recompile portions of the file that needed it. It's rather an accident of history that we use the granularity of a file at all.