Skip to content
  • Brad King's avatar
    cmListFileLexer: Convert CRLF -> LF newlines explicitly · a8c65234
    Brad King authored
    Read input files in binary mode instead of text mode and convert CRLF
    newlines to LF newlines explicitly in our own buffer.  This is necessary
    to read CMake source files with CRLF newlines on platforms whose C
    runtime libraries do not transform newlines in text mode.  For example,
    a Cygwin or Linux binary may not transform CRLF -> LF in files read from
    a Windows filesystem.  Perform the conversion ourselves to ensure that
    multi-line string literals in CMake source files have LF newlines
    everywhere.
    a8c65234