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

2009-10-02 Thread Hendrik Sattler
Zitat von Alan W. Irwin ir...@beluga.phys.uvic.ca: 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

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 ir...@beluga.phys.uvic.ca: [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

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

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

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

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

2009-10-02 Thread Hendrik Sattler
Zitat von Claudio Bley b_l_...@ml1.net: 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

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

2009-10-02 Thread Claudio Bley
Hendrik Sattler p...@hendrik-sattler.de writes: Zitat von Claudio Bley b_l_...@ml1.net: 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,

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

2009-10-02 Thread Hendrik Sattler
Zitat von Claudio Bley b_l_...@ml1.net: 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

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

2009-10-02 Thread Claudio Bley
Hendrik Sattler p...@hendrik-sattler.de writes: Zitat von Claudio Bley b_l_...@ml1.net: 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 --

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 b_l_...@ml1.net: 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 =

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

[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

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 ir...@beluga.phys.uvic.ca wrote: First, to give some background for the question in the subject line, we have implemented OCaml language support for PLplot

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 blanks