Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-02 Thread Bill Hoffman
Alan W. Irwin wrote: \ As for your request to explain why the second and third results are identical, I leave that to those who understand how and why CMake has been implemented in the way it has. I am not in that group, which is why I always fall back to simple experiments like above to determ

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-02 Thread Alan W. Irwin
On 2009-10-02 14:45+0200 Hendrik Sattler wrote: Zitat von Claudio Bley : But I think that his example is wrong, it should be: set(a "-Lfoo -lbar") message(STATUS "a = ${a}") set(a_list ${a}) message(STATUS "a_list = ${a_list}") Then the result should be -- a = -Lfoo -lbar -- a_list = -Lfoo;-lb

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-02 Thread Claudio Bley
Hendrik Sattler writes: > Zitat von Claudio Bley : >>> But I think that his example is wrong, it should be: >>> set(a "-Lfoo -lbar") >>> message(STATUS "a = ${a}") >>> set(a_list ${a}) >>> message(STATUS "a_list = ${a_list}") >>> >>> Then the result should be >>> -- a = -Lfoo -lbar >>> -- a_lis

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-02 Thread Hendrik Sattler
Zitat von Claudio Bley : But I think that his example is wrong, it should be: set(a "-Lfoo -lbar") message(STATUS "a = ${a}") set(a_list ${a}) message(STATUS "a_list = ${a_list}") Then the result should be -- a = -Lfoo -lbar -- a_list = -Lfoo;-lbar No, should it not. How should that be possi

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-02 Thread Claudio Bley
Hendrik Sattler writes: > Zitat von Claudio Bley : >>> set(a "hello world\\ hello world") >>> message(STATUS "a = ${a}") >>> set(a_list ${a}) >>> message(STATUS "a_list = ${a_list}") >>> >>> The result is >>> >>> -- a = hello world\ hello world >>> -- a_list = hello world\ hello world >> >> So, t

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-02 Thread Hendrik Sattler
Zitat von Claudio Bley : set(a "hello world\\ hello world") message(STATUS "a = ${a}") set(a_list ${a}) message(STATUS "a_list = ${a_list}") The result is -- a = hello world\ hello world -- a_list = hello world\ hello world So, the real issue here is that your CAIRO_LINK_FLAGS variable just c

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-02 Thread Claudio Bley
Hi. "Alan W. Irwin" writes: > On 2009-10-02 08:58+0200 Hendrik Sattler wrote: > >> Zitat von "Alan W. Irwin" : >>> [Use] >>> string(REGEX REPLACE " " ";" CAIRO_LINK_FLAGS_LIST "${CAIRO_LINK_FLAGS}") >>> [to convert a blank-delimited string to a list]. >> >> Doing this REGEX REPLACE cannot be t

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-02 Thread Alan W. Irwin
On 2009-10-02 06:26+0200 Andreas Pakulat wrote: On 01.10.09 18:18:24, Alan W. Irwin wrote: This solution obviously reduces the urgency of the concern I expressed about the motivation for escaping blanks for Linux because workarounds like above can always be used. However, I am still curious ab

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-02 Thread Alan W. Irwin
On 2009-10-02 08:58+0200 Hendrik Sattler wrote: Zitat von "Alan W. Irwin" : [Use] string(REGEX REPLACE " " ";" CAIRO_LINK_FLAGS_LIST "${CAIRO_LINK_FLAGS}") [to convert a blank-delimited string to a list]. Doing this REGEX REPLACE cannot be the recommended way as that breaks any paths that co

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-01 Thread Hendrik Sattler
Zitat von "Alan W. Irwin" : On 2009-10-01 19:51-0400 Bill Lorensen wrote: I think if you specify each arg as a string it should work as expected. "-L/usr/lib" "-lcairo" To generalize that idea, I have discovered since my post that if I transform the blank delimited string CAIRO_LINK_FLAGS (w

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-01 Thread Andreas Pakulat
On 01.10.09 18:18:24, Alan W. Irwin wrote: > This solution obviously reduces the urgency of the concern I expressed about > the motivation for escaping blanks for Linux because workarounds like above > can always be used. However, I am still curious about what the motivation > is for escaping blan

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-01 Thread Alan W. Irwin
On 2009-10-01 19:51-0400 Bill Lorensen wrote: I think if you specify each arg as a string it should work as expected. "-L/usr/lib" "-lcairo" To generalize that idea, I have discovered since my post that if I transform the blank delimited string CAIRO_LINK_FLAGS (which happens to be filled with

Re: [CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-01 Thread Bill Lorensen
I think if you specify each arg as a string it should work as expected. "-L/usr/lib" "-lcairo" On Thu, Oct 1, 2009 at 6:47 PM, Alan W. Irwin wrote: > First, to give some background for the question in the subject line, we have > implemented OCaml language support for PLplot using custom commands

[CMake] Why are blank-delimited strings in commands escaped on Linux?

2009-10-01 Thread Alan W. Irwin
First, to give some background for the question in the subject line, we have implemented OCaml language support for PLplot using custom commands. One issue with that support however, is that if a CMake variable is a blank-delimited string and used as part of a custom COMMAND, then in the command i