[CMake] Can't get include() to work!
Bill Hoffman
bill.hoffman at kitware.com
Wed Dec 3 21:41:38 EST 2008
Michael Jackson wrote:
>
> Actaully, on OS X some of the text editors including BBEdit and TextMate
> and Eclipse all give you the option of setting your line endings to
> "mac", "dos" or "unix". In some of those the defaults are "mac" which is
> /r/n. It is up to the user to set the default for new files to "unix".
> \
http://en.wikipedia.org/wiki/End-of-line
" * LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX,
Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others
* CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes,
CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS
* CR: Commodore machines, Apple II family, Mac OS up to version
9 and OS-9
"
So, it is just a \r in this file, and not a \r\n. \r\n is Windows, and
unix uses \n only.
I guess the problem is in the lexer CMake uses, and not the C++
library... It uses \n as the line ending. That works on but unix and
windows, but not with \r only mac files.
I suppose we could put a check to see if a file has no \n, but lots of
\r, and complain that it is an invalid file. Robert, how did you
create the file, was it the default for some editor?
-Bill
More information about the CMake
mailing list