MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0006852 | CMake | CMake | public | 2008-04-19 14:41 | 2008-04-21 17:51 |
Reporter | irwin | ||||
Assigned To | |||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | CMake-2-6 | ||||
Target Version | Fixed in Version | ||||
Summary | 0006852: LIST does not handle empty elements consistently or correctly | ||||
Description | The attached CMakeLists.txt file demonstrates a number of issues with the CMake LIST command with either CMake 2.4.8 or 2.6.0 RC-8 if the list contains empty elements. Results for LENGTH, GET, REMOVE_AT, REMOVE_ITEM, SORT, REVERSE, and INSERT are consistent with the mental model that no indices are assigned to empty elements of a CMake list, and the result has the empty elements dropped (which by accident gives the correct result for REMOVE_ITEM when an empty element is dropped). However, from the above results APPEND keeps those empty elements in the result, as does FIND, (but FIND cannot find those empty elements). I am not aware of any other language that ignores empty elements or drops them from the results for certain operations so I believe the above results are symptoms of a language bug that needs to be addressed. I don't know CMake well enough to give you a patch, but I assume it is a fairly trivial fix. The attached CMakeLists.txt also shows that any attempt to INSERT items exactly after the last element of the list fails with an out of range error. The INSERT should do the same thing as an APPEND in this case. Formally, this is a separate wish-list bug, but I am reporting it here since the fix is best done at the same time as the fix for the empty item problems. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | CMakeLists.txt (2,006) 2008-04-19 14:41 https://public.kitware.com/Bug/file/1419/CMakeLists.txt rc8_cmake.out (1,359) 2008-04-19 14:43 https://public.kitware.com/Bug/file/1420/rc8_cmake.out | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2008-04-19 14:41 | irwin | New Issue | |||
2008-04-19 14:41 | irwin | File Added: CMakeLists.txt | |||
2008-04-19 14:43 | irwin | File Added: rc8_cmake.out | |||
2008-04-19 14:45 | irwin | Note Added: 0011440 | |||
2008-04-21 17:51 | Bill Hoffman | Status | new => closed | ||
2008-04-21 17:51 | Bill Hoffman | Note Added: 0011464 | |||
2008-04-21 17:51 | Bill Hoffman | Resolution | open => fixed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|