[CMake] comparing variable contents
Steven Wilson
steven.wesley.wilson at gmail.com
Tue Sep 29 17:31:56 EDT 2009
Thanks all, I was missing the quotes around the initial ${FOO} in my
tests...
if("${FOO}" STREQUAL "${BAR}")
does what I wanted.
On Tue, Sep 29, 2009 at 1:51 PM, Nathaniel Waisbrot (Cont ARL/CISD) <
nathaniel.waisbrot at arl.army.mil> 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.
>
>
>
> Maybe the information that you're missing is that all CMake variables
> are stored internally as strings. So paths, lists, numbers, etc can be
> compared with STREQUAL.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090929/a5543638/attachment.htm>
More information about the CMake
mailing list