Implement cmd utility for cpp generation.