[CMake] comparing variable contents
Alexander Neundorf
a.neundorf-work at gmx.net
Tue Sep 29 13:36:59 EDT 2009
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 <tyler at cryptio.net> 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
More information about the CMake
mailing list