Following the official CMake documentation, this is not how one defines a macro. How can this work for you?
I'm getting the error message
CMake Error at CMakeLists.txt:13 (ua_generate_nodeset_and_datatypes):
Unknown CMake command "ua_generate_nodeset_and_datatypes".