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
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,
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
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 [
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
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
>
>