Re: [CMake] math(EXPR) and unary operators

2012-05-01 Thread cowwoc
Apparently this issue is 3 years old: http://public.kitware.com/Bug/view.php?id=8996 Gili Rolf Eike Beer wrote George Koehler wrote: math(EXPR) rejects expressions with negative numbers. This is awful because math() can reject its own negative results. For example, this code fails:

Re: [CMake] math(EXPR) and unary operators

2012-03-09 Thread j s
Make sure you set the precedence and associativity of this operator. Look for the prec declaration and resulting rule at: http://www.gnu.org/software/bison/manual/html_node/Infix-Calc.html For example: /* Bison declarations. */ %token NUM %left '-' '+' %left '*' '/'

Re: [CMake] math(EXPR) and unary operators

2012-03-09 Thread Rolf Eike Beer
George Koehler wrote: math(EXPR) rejects expressions with negative numbers. This is awful because math() can reject its own negative results. For example, this code fails: math(EXPR negative 1 - 2) math(EXPR sum 100 + ${negative}) If you are touching this file anyway, do you see any

[CMake] math(EXPR) and unary operators

2012-03-06 Thread George Koehler
math(EXPR) rejects expressions with negative numbers. This is awful because math() can reject its own negative results. For example, this code fails: math(EXPR negative 1 - 2) math(EXPR sum 100 + ${negative}) The second expression, 100 + -1, causes an error. This contradicts cmake