The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14035 
====================================================================== 
Reported By:                Ove Sommer
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14035
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2013-03-22 06:06 EDT
Last Modified:              2013-03-22 06:06 EDT
====================================================================== 
Summary:                    list(LENGTH ...) stops counting on special entries
Description: 
If a list of single-quoted strings contains an entry with an opening angle
bracket (ASCII 0x5b '[') the LENGTH sub-command stops counting entries following
this bracket entry.

Example: list L: 'a';'b';'c[';'d';'e'  =>  list(LENGTH L lenL)  =>  lenL=3
but actually lenL=5

Steps to Reproduce: 
list(APPEND l 'a';'b';'c[';'d';'e')
list(LENGTH l llen)
message("len(l) = ${llen}, l = ${l}")

Additional Information: 
The list was created by parsing a file via
file(STRINGS "${myFile}" MY_LINES REGEX "^ some_regexp.*$")

MY_LINES contains all entries, one of it contains an opening angle bracket
followed by a single quote.

This bug already occurs in CMake 2.8.2 which we actually use.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-03-22 06:06 Ove Sommer     New Issue                                    
2013-03-22 06:06 Ove Sommer     File Added: listLenTest.cmake                   

======================================================================

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to