Re: [CMake] passing arguments to the final make

2012-02-23 Thread Michael Hertling
On 02/23/2012 11:11 AM, Andrea Crotti wrote: > On 02/23/2012 06:20 AM, Michael Hertling wrote: >> >> The point is that ${SCRIPT} is substituted in the Makefile by >> >> (1) a macro specified on the command line >> (2) a macro specified in the Makefile >> (3) an environment variable >> >> in that or

Re: [CMake] passing arguments to the final make

2012-02-23 Thread Andrea Crotti
On 02/23/2012 06:20 AM, Michael Hertling wrote: The point is that ${SCRIPT} is substituted in the Makefile by (1) a macro specified on the command line (2) a macro specified in the Makefile (3) an environment variable in that order, or with (2) and (3) reversed if Make is invoked with the "-e"

Re: [CMake] passing arguments to the final make

2012-02-22 Thread Michael Hertling
On 02/23/2012 12:04 AM, John Drescher wrote: >> And another thing, is it actually \${SCRIPT} a portable solution that works >> on all the generators? >> > > This is not about generators but about what shell you are running > cmake from. For example that would not work on windows since the > comman

Re: [CMake] passing arguments to the final make

2012-02-22 Thread John Drescher
> And another thing, is it actually \${SCRIPT} a portable solution that works > on all the generators? > This is not about generators but about what shell you are running cmake from. For example that would not work on windows since the command prompt has a different syntax for variables. John --

Re: [CMake] passing arguments to the final make

2012-02-22 Thread Andrea Crotti
On 02/22/2012 09:18 PM, Michael Hertling wrote: On 02/22/2012 06:56 PM, Andrea Crotti wrote: On 02/22/2012 05:32 PM, Andrea Crotti wrote: Ah that's nice thanks, I'm not sure though that I can rely on being>= 2.8 always, and that's probably a requirement, right? I tried what you suggested and

Re: [CMake] passing arguments to the final make

2012-02-22 Thread Michael Hertling
On 02/22/2012 06:56 PM, Andrea Crotti wrote: > On 02/22/2012 05:32 PM, Andrea Crotti wrote: >> >> Ah that's nice thanks, I'm not sure though that I can rely on being >= >> 2.8 always, >> and that's probably a requirement, right? >> > > I tried what you suggested and with this: > add_custom_target

Re: [CMake] passing arguments to the final make

2012-02-22 Thread Andrea Crotti
On 02/22/2012 05:32 PM, Andrea Crotti wrote: Ah that's nice thanks, I'm not sure though that I can rely on being >= 2.8 always, and that's probably a requirement, right? I tried what you suggested and with this: add_custom_target(dev_no_run COMMAND ${PYTHON_EXECUTABLE} ${DEV_MAIN} -w ${WO

Re: [CMake] passing arguments to the final make

2012-02-22 Thread Michael Hertling
On 02/22/2012 06:32 PM, Andrea Crotti wrote: > On 02/22/2012 05:25 PM, Michael Hertling wrote: >> On 02/22/2012 04:43 PM, Andrea Crotti wrote: >>> I would like to be able to pass arguments to my generated Makefile. >>> >>> Suppose I use an environment variable like this: >>> >>> add_custom_target(r

Re: [CMake] passing arguments to the final make

2012-02-22 Thread Andrea Crotti
On 02/22/2012 05:25 PM, Michael Hertling wrote: On 02/22/2012 04:43 PM, Andrea Crotti wrote: I would like to be able to pass arguments to my generated Makefile. Suppose I use an environment variable like this: add_custom_target(run_dev_script COMMAND ${PYTHON_EXECUTABLE} ${PREREQUISITE}

Re: [CMake] passing arguments to the final make

2012-02-22 Thread Michael Hertling
On 02/22/2012 04:43 PM, Andrea Crotti wrote: > I would like to be able to pass arguments to my generated Makefile. > > Suppose I use an environment variable like this: > > add_custom_target(run_dev_script >COMMAND ${PYTHON_EXECUTABLE} ${PREREQUISITE} >COMMAND ${PYTHON_EXECUTABLE} ${SCRIPT

[CMake] passing arguments to the final make

2012-02-22 Thread Andrea Crotti
I would like to be able to pass arguments to my generated Makefile. Suppose I use an environment variable like this: add_custom_target(run_dev_script COMMAND ${PYTHON_EXECUTABLE} ${PREREQUISITE} COMMAND ${PYTHON_EXECUTABLE} ${SCRIPT} ) Would that actually work? In theory ${SCRIPT} is subs