| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0008397 | CMake | CMake | public | 2009-01-19 02:56 | 2009-01-20 08:13 | ||||
| Reporter | Philip Lowman | ||||||||
| Assigned To | Brad King | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | won't fix | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0008397: MACRO bug with constants | ||||||||
| Description | The FUNCTION works but the MACRO doesn't. MACRO(test_constants_macro _a ) MESSAGE("a = ${_a}") IF(_a) MESSAGE("test_constants_macro: a is true") ELSE() MESSAGE("test_constants_macro: ERROR: a is FALSE!") ENDIF() ENDMACRO() FUNCTION(test_constants_func _a ) MESSAGE("a = ${_a}") IF(_a) MESSAGE("test_constants_func: a is true") ELSE() MESSAGE("test_constants_func: ERROR: a is FALSE!") ENDIF() ENDFUNCTION() test_constants_macro(1) test_constants_macro(TRUE) test_constants_macro(ON) test_constants_func(1) test_constants_func(TRUE) test_constants_func(ON) a = 1 test_constants_macro: ERROR: a is FALSE! a = TRUE test_constants_macro: ERROR: a is FALSE! a = ON test_constants_macro: ERROR: a is FALSE! a = 1 test_constants_func: a is true a = TRUE test_constants_func: a is true a = ON test_constants_func: a is true | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0014643) Brad King (manager) 2009-01-20 08:12 |
From the documentation of MACRO: When it is invoked, the commands recorded in the macro are first modified by replacing formal parameters (${arg1}) with the arguments passed, and then invoked as normal commands. Only the ${} syntax usage gets replaced. Macro arguments are not real variables. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2009-01-19 02:56 | Philip Lowman | New Issue | |
| 2009-01-19 18:07 | Bill Hoffman | Status | new => assigned |
| 2009-01-19 18:07 | Bill Hoffman | Assigned To | => Brad King |
| 2009-01-20 08:12 | Brad King | Note Added: 0014643 | |
| 2009-01-20 08:13 | Brad King | Status | assigned => closed |
| 2009-01-20 08:13 | Brad King | Resolution | open => won't fix |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |