[cmake-developers] [CMake 0014785]: Unexpected behaviour in list when brackets are involved

Mantis Bug Tracker mantis at public.kitware.com
Tue Mar 4 16:36:44 EST 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14785 
====================================================================== 
Reported By:                toeb
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14785
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-03-04 16:36 EST
Last Modified:              2014-03-04 16:36 EST
====================================================================== 
Summary:                    Unexpected behaviour in list when brackets are
involved
Description: 
if semicoli inside are inside brackets [] they are not treated as list
delimiters in a foreach loop

Steps to Reproduce: 
set(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 Information: 
maybe it has somethingto do with variable evaluation inside foreach?  (just a
guess)
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-03-04 16:36 toeb           New Issue                                    
======================================================================



More information about the cmake-developers mailing list