Feature request: add NEWLINE_STYLE to all commands that generate text files
When cross compiling, text files (like a header files, config files, CMake files etc.) must be installed to the target system using the correct line endings. CMake currently supports line ending conversion, but only for a select few commands. This can make it difficult to generate functioning installs using
cmake --install or
cpack when cross compiling from Windows to an LF-based system line Linux or Android.
file(GENERATE) already have a
NEWLINE_STYLE option to specify the type of newlines generated. It would be useful to have a similar option in the following commands:
install(DIRECTORY)(as a sub option for
- other commands that generate text files that I may have overlooked
It would also be useful to be able to use
NEWLINE_STYLE together with
configure_file() thus making it possible to convert the line endings of a file without changing the actual content.