[Cmake] STREQUAL and FILE command

Andy Cedilnik andy . cedilnik at kitware . com
17 Jul 2003 14:58:24 -0400


Hi All,

There was a problem when I was writing the FILE command about what to do
with the last line of text. Should there be a new line or not. For
example, what if I say:

FILE(READ file1 var)
FILE(WRITE file2 ${var})

Should there be a new line in the last row of var? 

Anyway, I do agree with FILE(WRITE command to not put new line there,
and I fixed the cmake.

So, any thought of FILE(READ?

			Andy

On Thu, 2003-07-17 at 14:41, Brad King wrote:
> > question 1) Should the MATCHES command do the same as my STREQUAL, or
> > shall I commit the STREQUAL addition to the if command
> 
> MATCHES expects a regular expression on the right-hand side.  Use the
> STRING command to compare two strings for equality.
> 
> > question 2) Should I modify the File Write to not add a CR/LF
> 
> I vote yes.  One can always use a \n at the end of the string to be
> written.  Andy? Others?
> 
> -Brad