Fix git commit updating
- Switch back to
add_custom_targetso this gets run every build, removing the regression from !3382 (merged) forcing you to reconfigure if you wanted a change to be noticed. - Process
version.cppto an intermediate file instead of overwriting the potentially-already-up-to-date one, which would force it to be rebuilt,componentsto be re-archived, and all binaries to be relinked. - Only overwrite the existing
version.cppif there's a change.
Discussed here: !3909 (comment 1788291551)