On Tuesday 29 September 2009, Steven Wilson wrote:
> Of course I read the docs for the if() command.   It doesn't contain any
> comments about comparing a variable's value to another variable's value.
> Are you suggesting that if it isn't in the documentation then it isn't
> supported?   If so, please say so.   I was just hoping someone might know a
> way to do this kind of test/comparison.
>
> On Tue, Sep 29, 2009 at 11:08 AM, Tyler Roscoe <[email protected]> wrote:
> > On Tue, Sep 29, 2009 at 10:56:45AM -0600, Steven Wilson wrote:
> > > Is there a way to compare the contents of one variable with another?
> >
> > I'm
> >
> > > looking for something like:
> > > if(${FOO} EQUAL ${BAR})

if(${FOO} STREQUAL ${BAR})

(to be completely sure do 
if("${FOO}" STREQUAL "${BAR}")
)

Alex
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to