pure cmake implementation of generate_messages() macro, removes dependency on python execution during cmake configure steps