[CMake] make arguments

Bill Hoffman bill.hoffman at kitware.com
Wed Jul 23 12:42:58 EDT 2008


Christian Ehrlicher wrote:
>> Von: Milan Dorak
>> I can't find in documentation or anywhere else, how can i pass argument 
>> to make command.
>> I need 'make -j 3'. don't care if it's in CMakeLists.txt or CTest script.
>>
> Since when does cmake executes make directly? It's only creating makefiles for make...
> 
> 
> Christian

This is done when using ctest to build for testing.


In a "non-declarative" ctest script you can do this:

SET (CTEST_BUILD_COMMAND "make -i -j8")

In a declarative ctest script you can add this to the cache:

MAKECOMMAND:STRING=/usr/bin/make -i -j2


-Bill


More information about the CMake mailing list