Running a custom command at build time: I. Using add_custom_command This recipe will show how to use add_custom_target to add new targets with custom build goals to the build system. cxx-example