Notes |
|
(0017440)
|
Bill Hoffman
|
2009-09-14 12:47
|
|
MATH(EXPR varOutput "0 -1 + 1")
message("${varOutput}") |
|
|
(0018093)
|
Greg Sharp
|
2009-10-17 10:35
|
|
No floating point?
MATH (EXPR OUTPUT_VAR "1.1 + 1.1")
CMake Error at /home/gcs6/projects/plastimatch/test.cmake:1 (MATH):
math cannot parse the expression: "1.1 + 1.1": syntax error, unexpected
exp_NUMBER, expecting $end (4)
2.6.3 on linux |
|
|
(0029384)
|
Gili
|
2012-05-01 22:12
|
|
Bill,
How are we supposed to increment a number?
MATH (EXPR index "0 + ${index} + 1")
does not work because:
math cannot parse the expression: "0 + -1 + 1"
Is there a workaround for this? |
|
|
(0040249)
|
Nicholas Braden
|
2016-01-16 19:16
(edited on: 2016-01-16 19:28) |
|
This still affects CMake 3.4.1
@Gili This will always work whether the number is negative or positive:
math(EXPR index "0${index} + 1")
Hopefully they never add support for C-style octal numbers...
|
|
|
(0041556)
|
Kitware Robot
|
2016-06-10 14:27
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|