[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

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}

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 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(run_dev_script

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

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/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 command prompt