Just adding some recompilation of documentation triggers: is there a solution?

Sometimes, when I look at the header files, I would like to add something a little to the documentation (doxygen). This may be a brief remark about using some function parameter or just fixing a small typo.

But then I think: no, this will cause recompilation in the next call make! And for some basic headers, the whole project was recompiled, which can take a lot of time. So it doesn’t matter!

Is there a solution to this dilemma? Are there approaches where functions / classes are not documented directly in the headers? Or are there (plans) smart ones makewho would notice that only some comments have changed, but recompilation is not required?

+3
source share
6 answers

How about checking (you are using version control, right?) Another copy of the code base in another directory, only for these kinds of fixes?

It can be a separate branch or not. Then, when these kinds of small changes happen to you, you just make them here. You can transfer them directly: now they are in a safe place and will not interfere with your actual development. From time to time, just once a week, if the build time is really so long, you can combine these changes with what you are working on. Merge conflicts should be rare if you are documenting in one directory and writing code in another.

+3
source

ccache, , CCACHE_UNIFY.

ccache , .

CCACHE_UNIFY

CCACHE_UNIFY

CCACHE_UNIFY, ccache C/++ -g . , , , , ccache , . , CCACHE_UNIFY , CCACHE_UNIFY CCACHE_UNIFY . , , .

+6

touch , make , ?

, script.

+2

, . make , C, . , , , make .

.c, , . , "" , .

, , "touch" .

doxygen , ; doxygen , .

, ... .

+1

. , ; , , ?

0

, Makefile... make.

Of course, the disadvantage is that if I made changes that affect the memory layouts (for example, adding a member variable to a class), I need to remember that I need to manually touch the affected .cpp files (or if it's too hard to understand, regardless of of which cpp files are affected, do "make clean, make"), which may be error prone ... but this usually works for me.

-2
source

Source: https://habr.com/ru/post/1712415/


All Articles