Re: [CMake] How to write a correct wrapper of MESSAGE()?

2014-03-05 Thread Clark Wang
On Mon, Oct 21, 2013 at 6:06 PM, Johannes Zarl johannes.z...@jku.at wrote: On Thursday, 17. October 2013, 07:12:51, Clark WANG wrote: When I'm using CMake more and more I find it's not a real serious language. It's so tricky. I can see why you are frustrated. I don't think it's all bad

Re: [CMake] How to write a correct wrapper of MESSAGE()?

2013-10-21 Thread Johannes Zarl
On Thursday, 17. October 2013, 07:12:51, Clark WANG wrote: When I'm using CMake more and more I find it's not a real serious language. It's so tricky. I can see why you are frustrated. I don't think it's all bad though. Hopefully CMake3 will be used for some language cleanups at the expense of

Re: [CMake] How to write a correct wrapper of MESSAGE()?

2013-10-16 Thread Clark WANG
On Tue, Oct 15, 2013 at 8:12 PM, Johannes Zarl johannes.z...@jku.at wrote: On Monday, 14. October 2013, 19:07:06, Matthew Woehlke wrote: The IN LISTS signature of foreach seems to do additional list splitting, leading to (foo;bar baz) appearing as 3 elements. Accessing the ARGV array by

Re: [CMake] How to write a correct wrapper of MESSAGE()?

2013-10-15 Thread Johannes Zarl
On Monday, 14. October 2013, 19:07:06, Matthew Woehlke wrote: The IN LISTS signature of foreach seems to do additional list splitting, leading to (foo;bar baz) appearing as 3 elements. Accessing the ARGV array by the positional indices (e.g. ${ARGV0}) prevents the splitting. Really?

Re: [CMake] How to write a correct wrapper of MESSAGE()?

2013-10-14 Thread Matthew Woehlke
On 2013-10-09 07:44, Johannes Zarl wrote: I guess you search for something like this: function(info) set(msg) foreach(i RANGE ${ARGC}) set(msg ${msg}${ARGV${i}}) endforeach() message(STATUS [info] ${msg}) endfunction() message(Foo:bar;baz space FOO)

Re: [CMake] How to write a correct wrapper of MESSAGE()?

2013-10-09 Thread Johannes Zarl
I guess you search for something like this: function(info) set(msg) foreach(i RANGE ${ARGC}) set(msg ${msg}${ARGV${i}}) endforeach() message(STATUS [info] ${msg}) endfunction() message(Foo:bar;baz space FOO) info(Foo:bar;baz space FOO) message(two words) info(two words)

Re: [CMake] How to write a correct wrapper of MESSAGE()?

2013-10-09 Thread Clark WANG
On Wed, Oct 9, 2013 at 7:44 PM, Johannes Zarl johannes.z...@jku.at wrote: I guess you search for something like this: function(info) set(msg) foreach(i RANGE ${ARGC}) set(msg ${msg}${ARGV${i}}) endforeach() message(STATUS [info] ${msg}) endfunction()

Re: [CMake] How to write a correct wrapper of MESSAGE()?

2013-10-08 Thread Clark WANG
On Sat, Oct 5, 2013 at 1:38 AM, Matthew Woehlke matthew.woeh...@kitware.com wrote: On 2013-09-27 04:18, Clark WANG wrote: I'm trying to write some MESSAGE() wrappers like info(), warning(), fatal(), etc which may be a bit easier to use. But I failed to simulate the correct MESSAGE()

Re: [CMake] How to write a correct wrapper of MESSAGE()?

2013-10-04 Thread Matthew Woehlke
On 2013-09-27 04:18, Clark WANG wrote: I'm trying to write some MESSAGE() wrappers like info(), warning(), fatal(), etc which may be a bit easier to use. But I failed to simulate the correct MESSAGE() behavior no matter I use MACRO or FUNCTION. For example: [snip] FUNCTION vs MACRO shouldn't

[CMake] How to write a correct wrapper of MESSAGE()?

2013-09-27 Thread Clark WANG
I'm trying to write some MESSAGE() wrappers like info(), warning(), fatal(), etc which may be a bit easier to use. But I failed to simulate the correct MESSAGE() behavior no matter I use MACRO or FUNCTION. For example: MACRO(info_mac_1) message([MACRO 1] ${ARGV}) ENDMACRO()