cmake: support generating config.sh for testing