On Dec 11, 2007 8:16 AM, Bill Hoffman <[EMAIL PROTECTED]> wrote:
> Jian Wang wrote:
>
> >     Why is IF("${VARIABLE}" MATCHES "^${VARIABLE}$") used instead of IF(
> >     ${VARIABLE} STREQUAL ${VARIABLE} ) (which would always return true)?
> >     I'm not sure of use case but I'd say it's checking for special
> >     characters in VARIABLE.
> >
> > If it's checking for special characters then I have to say that it's not
> > the right way. For example, if VARIABLE == "a/b" then the IF statement
> > is still TRUE.
>
> It is checking to see if the VARIABLE has a value at all.  It is old
> code before we had IF(DEFINED VARIABLE) but works with all versions of
> CMake.

One of these days I'm going to try to construct a pathological input
to make it barf.  But I've still got other priorities.


Cheers,
Brandon Van Every
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to