add a script to build an optimized executable

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>