[CMake] comparing variable contents

Nathaniel Waisbrot (Cont ARL/CISD) nathaniel.waisbrot at arl.army.mil
Tue Sep 29 15:51:42 EDT 2009


> 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.




More information about the CMake mailing list