Re: [CMake] macro/function and ARGN weird behavior

2009-05-15 Thread Nicolas Desprès
Thx for the explanation David. I will take care of it. Cheers, 2009/5/15 David Cole : > The other difference (besides scoping) between a macro and a function > explains the behavior you are seeing: > The parameters to a function are automatically local variables inside the > function scope. The p

Re: [CMake] macro/function and ARGN weird behavior

2009-05-15 Thread David Cole
The other difference (besides scoping) between a macro and a function explains the behavior you are seeing: The parameters to a function are automatically local variables inside the function scope. The parameters to a macro are not actually variables. They are merely expanded *as if* they were vari

[CMake] macro/function and ARGN weird behavior

2009-05-15 Thread Nicolas Desprès
Hi there, I'm experiencing a weird behavior with cmake 2.6.4 (Win32) playing with macro, function and ARGN. === script function(print_var) foreach(i ${ARGV}) message("${i}='${${i}}'") endforeach(i) endfunction(print_var) macro(print_var_macro) foreach(i ${ARGV}) message("macro ${i}