How to create reliable command-line configured argument dependencies for custom commands?

Hi Frank:

Thanks for your thoughts on this topic.

For at least my use case, CMake (version 3.13.4 is what I am testing
since that is the minimum CMake version I allow for this project)
appears to be doing exactly the right thing (once I implemented the
file and target dependency chains properly but with no special
provisions for argument dependencies). That is all commands previous
in the dependency chain to commands whose arguments are changed are
not rebuilt while the commands whose arguments changed as well as
all commands that depend on those changed argument commands are
rebuilt.

I am happy with that correct result for how argument changes
automatically (with no special provisions) propagate through existing
file and target dependency chains since it makes a big practical
difference for my particular use case. There it takes 13 minutes of
real time and ~80 minutes of cpu time to rebuild the papers from
scratch with virtually all that time spend on generating data files to
be plotted. But to just to rebuild the plots whose command-line
arguments changed, and papers that depend on those plots without
rebuilding those data files takes only ~10 seconds or so. Which
allows quick comparisons of the quality of the figures generated by
various combinations of PLplot options. So thanks to CMake knowing
exactly what to do with changed custom command arguments and their
associated dependency chains, those ~60 plot comparisons for different
sets of PLplot options are a near-interactive experience.

1 Like