Add cmake script for regenerate RD methods.