Re: [Doxygen-users] Compare with already existing and identical output file and *not* refresh its *
Brought to you by:
dimitri
|
From: Marc H. <mar...@gm...> - 2019-02-15 22:04:23
|
> Short of actually implementing complex incremental builds, there's
> another, unrelated and also much simpler optimization Doxygen could do:
> just vaguely keep track of modified times on *input* files.
> [..]
> This would make a huge difference for incremental builds that involve not
> just doxygen but other (and faster) tools too; they could just skip running
> doxygen when not needed.
>
> PS: If anyone has ideas on how to emulate this with a small number of
> lines of CMake then please share. For instance this could generate an empty
> file right before starting doxygen as a decent approximation.
>
>
OK, emulating this in CMake was much easier than I thought. It would still
be simpler and safer if Doxygen provided it for any build system...
set(DOXYGEN_RUN_STAMP build/doxygen_run_tstamp)
# Duplicates Doxyfile, must be kept in sync manually
file(GLOB_RECURSE . DOXYGEN_SOURCES
../include/*.[c,h]
../tests/*.[c,h]
...
)
add_custom_command(
OUTPUT ${DOXYGEN_RUN_STAMP}
COMMAND cmake -E touch ${DOXYGEN_RUN_STAMP}
COMMAND doxygen ...
...
DEPENDS ${DOXYGEN_SOURCES}
)
|