Use VERBATIM to ensure spaces inside command line arguments don't get escaped automatically. On Linux and Windows the oneAPI kernel compilation still has problems. There is an apparent bug with single quote escaping in add_custom_command which means it's not easy to use VERBATIM.