generalized CPP build script