MantisBT - CMake | |||||||||||||||
View Issue Details | |||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||
0013187 | CMake | CMake | public | 2012-05-03 13:40 | 2016-06-10 14:31 | ||||||||||
Reporter | Patrick Spendrin | ||||||||||||||
Assigned To | Kitware Robot | ||||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||||
Status | closed | Resolution | moved | ||||||||||||
Platform | Windows | OS | Windows | OS Version | 7 | ||||||||||
Product Version | CMake-2-8 | ||||||||||||||
Target Version | Fixed in Version | ||||||||||||||
Summary | 0013187: ARGVx is not reset in recursive function calls | ||||||||||||||
Description | When recursively calling functions, ARGV0-ARGV9 are inherited by the inner function calls - this will make it hard to decide for the inner function calls to decide whether they got an argument or not. | ||||||||||||||
Steps To Reproduce | run the following code: function(testfunc1) message(STATUS "testfunc1: ${ARGV0} ${ARGV1} ${ARGV2}") testfunc2("${ARGV0}") endfunction(testfunc1) function(testfunc2) message(STATUS "testfunc2: ${ARGV0} ${ARGV1} ${ARGV2}") endfunction(testfunc2) testfunc1(para1 para2 para3) expected result is L:\>cmake -P C:\kde\kde-stable\tmp\cmake-argv-bug\argv-bug.cmake -- testfunc1: para1 para2 para3 -- testfunc2: para1 actual result is L:\>cmake -P C:\kde\kde-stable\tmp\cmake-argv-bug\argv-bug.cmake -- testfunc1: para1 para2 para3 -- testfunc2: para1 para2 para3 | ||||||||||||||
Additional Information | ARGN works as expected; It is unclear whether anybody could rely on this bug, since it likely depends on the order in which functions are called. | ||||||||||||||
Tags | No tags attached. | ||||||||||||||
Relationships |
| ||||||||||||||
Attached Files | |||||||||||||||
Issue History | |||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||
2012-05-03 13:40 | Patrick Spendrin | New Issue | |||||||||||||
2012-07-09 13:33 | Rolf Eike Beer | Relationship added | has duplicate 0013387 | ||||||||||||
2015-02-26 16:34 | Stephen Kelly | Relationship added | related to 0015380 | ||||||||||||
2016-06-10 14:28 | Kitware Robot | Note Added: 0042038 | |||||||||||||
2016-06-10 14:28 | Kitware Robot | Status | new => resolved | ||||||||||||
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved | ||||||||||||
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot | ||||||||||||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|