[CMake] (no subject)

Alexander Neundorf a.neundorf-work at gmx.net
Mon Jun 13 11:43:11 EDT 2011


On Monday 13 June 2011, Gabriel Nützi wrote:
> Hello
> 
>  I have the following stupid problem with cmake:
> 
>  I want
> 
>  CMAKE_BUILD_TOOL or the deprecated CMAKE_MAKE_PROGRAM to be set to
> 
>  /usr/bin/make -j12    (for multithreaded build)
> 
>  how can we pass arguments to the build tool (make)?
>  in eclipse that does not work because in the .cproject file
>  there is a target now defined as
> 
>  <target name=": all " path=""
> targetID="org.eclipse.cdt.make.MakeTargetBuilder">
>                          <buildCommand>/usr/bin/make
> -j12</buildCommand>
>                         
> <buildTarget>rebuild_cache</buildTarget>
>                          <stopOnError>true</stopOnError>
>                         
> <useDefaultCommand>false</useDefaultCommand>
>                         
> <runAllBuilders>true</runAllBuilders>
>   </target>
>  which can not be executed!!
>  but to correctly execute the target in eclipse it should be:
> 
>  <target name=": rebuild_cache" path=""
> targetID="org.eclipse.cdt.make.MakeTargetBuilder">
>                         
> <buildCommand>/usr/bin/make</buildCommand>
>                          <buildArguments>
> -j12</buildArguments>
>                         
> <buildTarget>rebuild_cache</buildTarget>
>                          <stopOnError>true</stopOnError>
>                         
> <useDefaultCommand>false</useDefaultCommand>
>                         
> <runAllBuilders>true</runAllBuilders>
>  </target>
> 
> 
> Can anyone help me how to do this properly?

Are you using the Eclipse project generator ?
Then you can set the variable CMAKE_ECLIPSE_MAKE_ARGUMENTS to "-j12" via 
cmake-gui or ccmake.

Alex


More information about the CMake mailing list