> foreach(l IN LISTS ${list_name})
I got that lesson now - Thanks to you all. Everything works as expected.
Marc Weber
___
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please
On 5. May, 2010, at 16:29 , Benoit Thomas wrote:
> On 2010-05-05 10:22, Michael Wild wrote:
>> # prefix and suffix elements
>> > foreach(l ${list_name})
>> >list(APPEND ${list_name}_TMP ${prefix}${l}${suffix} )
>> > endforeach()
>>
> You also have an error in your foreach, i
On 2010-05-05 10:22, Michael Wild wrote:
# prefix and suffix elements
> foreach(l ${list_name})
>list(APPEND ${list_name}_TMP ${prefix}${l}${suffix} )
> endforeach()
You also have an error in your foreach, it should be:
foreach(l ${${list_name}})
--
Ben.
___
On 5. May, 2010, at 16:14 , Marc Weber wrote:
> Hi, I'm new to cmake.
>
> I asked at #cmake how to prefix a string to a list of paths.
> I got the reply that I should use a foreach loop which worked.
>
> Can I abstract this pattern using a macro such as this?
>
>
> # prefix and suffix each e
Hi, I'm new to cmake.
I asked at #cmake how to prefix a string to a list of paths.
I got the reply that I should use a foreach loop which worked.
Can I abstract this pattern using a macro such as this?
# prefix and suffix each element of list by ${prefix}elemnt${suffix}
macro(PREFIXSUFFIX l