Re: [CMake] File names with unbalanced square brackets

2016-03-19 Thread CHEVRIER, Marc
t; on behalf of Petr Kmoch <petr.km...@gmail.com<mailto:petr.km...@gmail.com>> Date: Friday 18 March 2016 at 08:17 To: Allen Barnett <allenbarne...@gmail.com<mailto:allenbarne...@gmail.com>> Cc: "cmake@cmake.org<mailto:cmake@cmake.org>" <CMake@cmake.org&l

Re: [CMake] File names with unbalanced square brackets

2016-03-19 Thread Allen Barnett
Hi David: Per your comment on the SO thread about escaping the ['s with a backslash:You mean something like this: file( GLOB FILES "*" ) string( REPLACE "[" "\\[" FILES_UPD "${FILES}" ) That doesn't appear to work. I still get everything past the first [ run together in the foreach. Thanks,

Re: [CMake] File names with unbalanced square brackets

2016-03-19 Thread Allen Barnett
Hi Petr: You're right! If I rename "c" to "c]", it treats the whole "/home/allen/test/b[;/home/allen/test/c]" as an element of the list. The other file names are correctly split apart. Thanks, Allen On Fri, Mar 18, 2016 at 3:17 AM, Petr Kmoch wrote: > Hi Allen. > > I'm not

Re: [CMake] File names with unbalanced square brackets

2016-03-19 Thread Petr Kmoch
Hi Allen. I'm not sure whether it's documented, but CMake interprets square brackets as escaping the semi-colon character (which means a semi-colon in square brackets will not work as a list item separator). You will probably have to translate the file names for CMake processing by replacing [

[CMake] File names with unbalanced square brackets

2016-03-18 Thread Allen Barnett
I inherited a set of files with somewhat unusual file names. In particular, there were a couple of files whose names included a single square bracket character. I processed these files with the file( GLOB ...) command and then iterated over the resulting list with foreach. However, the foreach

Re: [CMake] File names with unbalanced square brackets

2016-03-18 Thread Allen Barnett
gt; on behalf of Petr Kmoch < > petr.km...@gmail.com> > Date: Friday 18 March 2016 at 08:17 > To: Allen Barnett <allenbarne...@gmail.com> > Cc: "cmake@cmake.org" <CMake@cmake.org> > Subject: Re: [CMake] File names with unbalanced square brackets > >