Re: [CMake] more targets to run in parallel

2012-02-21 Thread Andrea Crotti
Anyway just to answer myself, I managed to solve all my problems. Now I first generate at cmake file a file with some paths, and from these paths I generate all the targets that I need. I also create a list with all the targets to make it easy from other targets to depend on them. Here below t

Re: [CMake] more targets to run in parallel

2012-02-20 Thread Andrea Crotti
Going back to the original question, I realised that my approach could not work. In short the list of targets and commands that I need to generate depend on a file, which is generated from a python script. So I thought I could use execute_process before the foreach: execute_process( OUTPUT

Re: [CMake] more targets to run in parallel

2012-02-20 Thread David Cole
On Mon, Feb 20, 2012 at 11:03 AM, Andrea Crotti wrote: > On 02/20/2012 03:50 PM, David Cole wrote: > > On Mon, Feb 20, 2012 at 10:42 AM, Eric Noulard wrote: > >> 2012/2/20 Andrea Crotti : >> > On 02/20/2012 03:15 PM, David Cole wrote: >> > >> > >> > Use: >> > >> > COMMAND ls -l >> > >> > Not:

Re: [CMake] more targets to run in parallel

2012-02-20 Thread Andrea Crotti
On 02/20/2012 03:50 PM, David Cole wrote: On Mon, Feb 20, 2012 at 10:42 AM, Eric Noulard > wrote: 2012/2/20 Andrea Crotti mailto:andrea.crott...@gmail.com>>: > On 02/20/2012 03:15 PM, David Cole wrote: > > > Use: > > COMMAND ls -l

Re: [CMake] more targets to run in parallel

2012-02-20 Thread Andrea Crotti
On 02/20/2012 03:42 PM, Eric Noulard wrote: You may avoid to create a list in the first place: set(myoptions "one two three") instead of set(myoptions one two three) see cmake --help-command list or you can string(REPLACE ";" " " stringopts "${myoptions}") message(STATUS "${stringopts}") So

Re: [CMake] more targets to run in parallel

2012-02-20 Thread David Cole
On Mon, Feb 20, 2012 at 10:42 AM, Eric Noulard wrote: > 2012/2/20 Andrea Crotti : > > On 02/20/2012 03:15 PM, David Cole wrote: > > > > > > Use: > > > > COMMAND ls -l > > > > Not: > > > > COMMAND "ls -l" > > > > > > Yes thanks, I started using the "" because I noticed that sometimes they > are

Re: [CMake] more targets to run in parallel

2012-02-20 Thread Eric Noulard
2012/2/20 Andrea Crotti : > On 02/20/2012 03:15 PM, David Cole wrote: > > > Use: > >   COMMAND ls -l > > Not: > >   COMMAND "ls -l" > > > Yes thanks, I started using the "" because I noticed that sometimes they are > needed. > So suppose I want to split the options and the command, this: > > set(my

Re: [CMake] more targets to run in parallel

2012-02-20 Thread Andrea Crotti
On 02/20/2012 03:15 PM, David Cole wrote: Use: COMMAND ls -l Not: COMMAND "ls -l" Yes thanks, I started using the "" because I noticed that sometimes they are needed. So suppose I want to split the options and the command, this: set(myoptions one two three) set(mycmd ls -l) message

Re: [CMake] more targets to run in parallel

2012-02-20 Thread David Cole
On Mon, Feb 20, 2012 at 7:58 AM, Andrea Crotti wrote: > On 02/20/2012 11:51 AM, Eric Noulard wrote: > >> 2012/2/20 Andrea >> Crotti >> >: >> >>> On 02/17/2012 03:35 PM, Andrea Crotti wrote: >>> .. >>> >>> I can make the question much simpler, is it possible to generate targets >>> dynamically wit

Re: [CMake] more targets to run in parallel

2012-02-20 Thread Andrea Crotti
On 02/20/2012 11:51 AM, Eric Noulard wrote: 2012/2/20 Andrea Crotti: On 02/17/2012 03:35 PM, Andrea Crotti wrote: .. I can make the question much simpler, is it possible to generate targets dynamically with CMake? As far as I know you can "generate" targets at CMake-time but not at build-time.

Re: [CMake] more targets to run in parallel

2012-02-20 Thread Eric Noulard
2012/2/20 Andrea Crotti : > On 02/17/2012 03:35 PM, Andrea Crotti wrote: > .. > > I can make the question much simpler, is it possible to generate targets > dynamically with CMake? As far as I know you can "generate" targets at CMake-time but not at build-time. So from my point of view this "compu

Re: [CMake] more targets to run in parallel

2012-02-20 Thread Andrea Crotti
On 02/17/2012 03:35 PM, Andrea Crotti wrote: .. I can make the question much simpler, is it possible to generate targets dynamically with CMake? I was trying the following (nonsense), a simple loop over a list that first generates a custom command and another loop that generates a target for e

[CMake] more targets to run in parallel

2012-02-17 Thread Andrea Crotti
So suppose I have a list of Python eggs, in the form. - egg1 - egg2 - .. What I would like to do is to have be able to do. cmake . make build_eggs which would go over the list of the eggs and run in each of them python setup.py bdist_egg -d The list of eggs is actually computed at run-time,