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.waisb...@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. > > >
_______________________________________________ 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