move cmd param setup for build into own method

This is a minor refactor to avoid duplication of the command line parameter information and making it easier to maintain.