MantisBT - CMake
View Issue Details
0015181CMakeCMakepublic2014-09-30 13:182016-01-04 11:52
tron_thomas 
Robert Maynard 
normalminoralways
closedduplicate 
CMake 2.8.12.2 
 
0015181: math can't handle negative numbers.
The math command cannot do addition with negative numbers
Run CMake against the following CMakeLists.txt file:

cmake_minimum_required (VERSION 2.8)

project (MathFailure)

set (value -1)
math (EXPR value "${value} + 1")

Expected:
value should be incremented to zero

Actual:
CMake Error at CMakeLists.txt:6 (math):
  math cannot parse the expression: "-1 + 1": syntax error, unexpected
  exp_MINUS, expecting exp_OPENPARENT or exp_NUMBER (1)

No tags attached.
duplicate of 0008996closed Bill Hoffman Bug in MATH EXPR 
related to 0015707closed Robert Maynard Error at: math(EXPR value "-1 + 1") 
Issue History
2014-09-30 13:18tron_thomasNew Issue
2014-09-30 13:52David ColeRelationship addedduplicate of 0008996
2014-09-30 13:53David ColeNote Added: 0036879
2015-08-22 05:44David ColeRelationship addedrelated to 0015707
2015-08-22 05:44David ColeStatusnew => resolved
2015-08-22 05:44David ColeResolutionopen => duplicate
2015-08-22 05:44David ColeAssigned To => Robert Maynard
2016-01-04 11:52Robert MaynardNote Added: 0040121
2016-01-04 11:52Robert MaynardStatusresolved => closed

Notes
(0036879)
David Cole   
2014-09-30 13:53   
It's been in there for quite a while like that. Duplicate issue is more than 5 years old...
(0040121)
Robert Maynard   
2016-01-04 11:52   
Closing resolved issues that have not been updated in more than 4 months.