Tristan Carel wrote: > Hi, > > Does CMake performs arithmetic expansion? > Do we have to use an external tool? (like bc, or expr) > > I don't find anything about it on the bug tracker. > > I would be fantastic to be able to write something like this: > SET(Foo 2) > SET(Bar $EVAL{0x101000 + ${Foo}}) > > To avoid complexity growth of the parser but still be > platform-independant, maybe you could add a command available with > CMake -E. > ==> CMAKE -E EVAL "0x101000 + ${Foo}" > > The worst case would be a module FindBc.cmake which provides a macro Bc_EVAL > > my 2 cents.
cmake version 2.5-20061010 MATH Mathematical expressions. MATH(EXPR <output variable> <math expression>) EXPR evaluates mathematical expression and return result in the output variable. Example mathematical expression is '5 * ( 10 + 13 )'. -- Filipe Sousa
signature.asc
Description: OpenPGP digital signature
_______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake