Sometimes, when I look through my header files I'd like to add something little to the (doxygen) documentation. That might be a quick note about the use of some function parameter, or just fixing a little typo.
But then I think: Oh no, that'll trigger a recompile on the next make call! And for certain basic headers the whole project would recompile, which can take a long time. So, nevermind!
Is there a solution to this dilemma? Are there approaches where the functions/classes are documented not directly in the headers? Or are there (plans for) a smart make that would notice that only some comment has changed, but no recompilation is necessary?
You could shorten the compile times using ccache, possibly with the CCACHE_UNIFY environment option set.
ccache hashes the pre-processor output, and serves the previously compiled object if no changes were detected.
Man page section about CCACHE_UNIFY
CCACHE_UNIFYIf you set the environment variable
CCACHE_UNIFYthen ccache will use the C/C++ unifier when hashing the pre-processor output if -g is not used in the compile. The unifier is slower than a normal hash, so setting this environment variable loses a little bit of speed, but it means that ccache can take advantage of not recompiling when the changes to the source code consist of reformatting only. Note that usingCCACHE_UNIFYchanges the hash, so cached compiles withCCACHE_UNIFYset cannot be used whenCCACHE_UNIFYis not set and vice versa. The reason the unifier is off by default is that it can give incorrect line number information in compiler warning messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With