Bug file(GENERATE OUTPUT ... CONTENT) converts line ends
I construct a variable containing \n aka Unix line end characters. I then write it out on a Windows platform using file(GENERATE OUTPUT ... CONTENT ...) command. The resultant file contains \r\n, aka Windows line end characters. I didn't try if it was broken in the other direction, writing \r\n out on a Linux box.
Just so you know why I'm trying to do this I'm generating a bash script that I am then going to run in an Ubuntu shell on Windows Subsystem for Linux. The bash interpreter does not accept \r\n.
Reading through the documentation the only file writing command I can see that mentions line ends is configure_file where you can explicitly select, none of the file commands mention line ends so I assume they do nothing to them or any other manipulation of the data I provide.