RFE: `genexp_escape()` function or similar
One way to deal with the problems of ;
-delimited lists is to use generator expressions. CMake list-building functions should support should provide a function for escaping the string so that it will no longer be mangled by use as a list element or unquoted argument, and such that expanding generator expressions in it will return the original string. Similarly, functions that deconstruct lists should provide support for undoing the escaping.
Redirection operators which are special to add_custom_command
and similar also need to be converted into generator expressions as my next proposal will quote them when they result from generator expression expansion as opposed to being present literally.
Edited by Demi Marie Obenour