On 12/01/2011 06:04 PM, Robert Dailey wrote:
On Wed, Nov 30, 2011 at 7:18 PM, Michael Hertling mhertl...@online.dewrote:
On 11/30/2011 03:29 AM, Robert Dailey wrote:
I use macros so the _array2d_ variables fall through the scope of the
macro
and are available in the next call to
On 12/01/2011 08:14 PM, Robert Dailey wrote:
PARENT_SCOPE isn't working for me. For example, I changed one line in
array2d_begin_loop to the following:
set( _array2d_index 0 PARENT_SCOPE )
And from within array2d_advance(), I do:
message( _array2d_index: ${_array2d_index} )
and it
On Wed, Nov 30, 2011 at 7:18 PM, Michael Hertling mhertl...@online.dewrote:
On 11/30/2011 03:29 AM, Robert Dailey wrote:
I use macros so the _array2d_ variables fall through the scope of the
macro
and are available in the next call to array2d_advance(). I could use
functions + properties
PARENT_SCOPE isn't working for me. For example, I changed one line in
array2d_begin_loop to the following:
set( _array2d_index 0 PARENT_SCOPE )
And from within array2d_advance(), I do:
message( _array2d_index: ${_array2d_index} )
and it prints no value. Can you try this and see if it works for
On 11/30/2011 03:29 AM, Robert Dailey wrote:
On Tue, Nov 29, 2011 at 5:57 PM, Michael Hertling mhertl...@online.dewrote:
Just some spontaneous questions/remarks:
Thanks; I really appreciate it!
- Why do you use macros instead of functions?
I use macros so the _array2d_ variables
I have created a pretty clean solution to this until there is native
support for multi-dimensional arrays in CMake. I have attached the module,
hopefully it will prove useful to others. Here is an example of how to use
it:
set( two_dee_array
apple cat
orange dog
banana elephant
)
On 11/30/2011 12:28 AM, Robert Dailey wrote:
I have created a pretty clean solution to this until there is native
support for multi-dimensional arrays in CMake. I have attached the module,
hopefully it will prove useful to others. Here is an example of how to use
it:
set( two_dee_array
On Tue, Nov 29, 2011 at 5:57 PM, Michael Hertling mhertl...@online.dewrote:
Just some spontaneous questions/remarks:
Thanks; I really appreciate it!
- Why do you use macros instead of functions?
I use macros so the _array2d_ variables fall through the scope of the macro
and are available
How about the following two examples for a table or 2d array.
In the first one, each column can have a name too. Its like an array of
pointers in C++.
set(fruits apple orange banana)
set(animals cat dog elephant)
set(columns fruits animals)
foreach(column ${columns})
foreach(item
Is it possible to have 2D arrays in CMake? As far as the core syntax is
concerned, it seems like only 1D arrays are supported. So far I've had to
work around this issue by using a flat array and skipping over elements
using foreach() with a range and step.
Any ideas? Thanks.
-
Robert
10 matches
Mail list logo