[CMake] Setting default make options for Makefiles generator

Philip Lowman philip at yhbt.com
Thu Mar 5 01:37:59 EST 2009


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090305/0fd062c8/attachment.htm>


More information about the CMake mailing list