demo.cpp: added build_command_line function.