View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014785CMakeCMakepublic2014-03-04 16:362014-10-06 10:32
Reportertoeb 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
Platformx86OSWindowsOS Version7
Product VersionCMake 2.8.12.2 
Target VersionFixed in Version 
Summary0014785: Unexpected behaviour in list when brackets are involved
Descriptionif semicoli inside are inside brackets [] they are not treated as list delimiters in a foreach loop
Steps To Reproduceset(lst"1;2;[;3;4;5;];6;7")
foreach(element ${lst})
  message("${element}")
endforeach()

# prints
# 1
# 2
# [;3;4;5;]
# 6
# 7
# what i expected:
# 1
# 2
# [
# 3
# 4
# 5
# ]
# 6
# 7
Additional Informationmaybe it has somethingto do with variable evaluation inside foreach? (just a guess)
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0035250)
Brad King (manager)
2014-03-04 16:39

This is documented behavior:

 http://www.cmake.org/cmake/help/v3.0/manual/cmake-language.7.html#lists [^]
 "...splitting on ; characters not following an unequal number of [ and ] characters..."
(0036933)
Robert Maynard (manager)
2014-10-06 10:32

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2014-03-04 16:36 toeb New Issue
2014-03-04 16:39 Brad King Note Added: 0035250
2014-03-06 10:37 Brad King Status new => resolved
2014-03-06 10:37 Brad King Resolution open => no change required
2014-10-06 10:32 Robert Maynard Note Added: 0036933
2014-10-06 10:32 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team