Please see add_custom_command with generator config commands - #7 by scottaronbloom
It would be great, and a natural extension of the add_custom_command functionality if it supported the CONFIGURATIONS parameter in the same manner the INSTALL and other commands do as well