[CMake] Setting default make options for Makefiles generator

Adolfo Rodríguez dofo79 at gmail.com
Thu Mar 5 03:23:25 EST 2009


Thanks Philip,

I had considered the alias option before, but wanted to rule out that there
was no way of doing it the scope of a cmake project, however strange that
may sound. I will probably take that path now.

Cheers,

Adolfo

On Thu, Mar 5, 2009 at 7:37 AM, Philip Lowman <philip at yhbt.com> wrote:

> On Wed, Mar 4, 2009 at 10:55 AM, Adolfo Rodríguez <dofo79 at gmail.com>wrote:
>
>> Hi,
>>
>> I was wondering if it's possible to specify with cmake default options to
>> the make command, i.e., when I type "make foo", it would be equivalent to
>> "make -j foo", or "make -C some/path foo". My first impression is that
>> messing around with what "make" does is out of the scope of cmake (and maybe
>> should not be messed around with ;-) ).
>
>
> If the goal is to at the shell change what the make command does, perhaps
> you could use aliases or shell functions?
>
> alias make="make -j5"
>
> function mymake()
> {
>    make -C /my/build/tree/is/usually/here
> }
>
> function myjmake()
> {
>    make -j $1 -C /my/build/tree/is/usually/here
> }
> myjmake 500 # lotsa cores
>
> --
> Philip Lowman
>



-- 
Adolfo Rodríguez Tsouroukdissian

Robotics engineer
PAL ROBOTICS S.L
http://www.pal-robotics.com
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090305/cc83b40b/attachment.htm>


More information about the CMake mailing list