cmMakefile: Split custom command creation
Refactor custom command manipulation functions to consist of a setup and a commit stage. The commit stage will be delayed to generate time.
Refactor custom command manipulation functions to consist of a setup and a commit stage. The commit stage will be delayed to generate time.