Re: [CMake] parallel build using cmake --build?
On Sat, Nov 26, 2011 at 10:46:10AM -0500, John Drescher wrote: On Fri, Nov 25, 2011 at 10:16 PM, Steve M. Robbins st...@sumost.ca wrote: Hi, To build VTK on our windows build server, I wrote a small batch script that invokes cmake --build. My developer machine is multicore; is there a way to get cmake --build to run multiple jobs? On windows, I use the following tool http://www.codeproject.com/KB/cpp/runjobs.aspx to build each configuration (Debug, Release, RelWithDebInfo ...) in parallel using separate calls to cmake --build. Thanks -- that's great tip. In my present case, however, I'm building just the Release configuration and was hoping to parallelize that with the equivalent of make -jN. To Michael Hertling's comment: cmake --build is just a front-end for the native build tool CMake generates input for. If this tool can be invoked via the command line with options for parallel building, you can provide them after the -- in the cmake --build command, e.g. cmake --build bindir -- -j 4 for parallel building with Makefiles. I would do this if I were using makefiles. In the present case, I'm using Microsoft VS2010. I was kind of hoping that cmake had abstracted the parallelism so that I could stay ignorant of the Visual Studio command line details and possibly in future write build scripts that are cross-platform. Thanks, -Steve signature.asc Description: Digital signature -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] parallel build using cmake --build?
On 11/27/2011 05:21 PM, Steve M. Robbins wrote: On Sat, Nov 26, 2011 at 10:46:10AM -0500, John Drescher wrote: On Fri, Nov 25, 2011 at 10:16 PM, Steve M. Robbins st...@sumost.ca wrote: Hi, To build VTK on our windows build server, I wrote a small batch script that invokes cmake --build. My developer machine is multicore; is there a way to get cmake --build to run multiple jobs? On windows, I use the following tool http://www.codeproject.com/KB/cpp/runjobs.aspx to build each configuration (Debug, Release, RelWithDebInfo ...) in parallel using separate calls to cmake --build. Thanks -- that's great tip. In my present case, however, I'm building just the Release configuration and was hoping to parallelize that with the equivalent of make -jN. IIRC, cmake --build once invoked MSBuild in a VS environment, and MSBuild has the /maxcpucount option, see [1]. Have you already tried to achieve something similar with the VS2010 devenv-based mechanism? To Michael Hertling's comment: cmake --build is just a front-end for the native build tool CMake generates input for. If this tool can be invoked via the command line with options for parallel building, you can provide them after the -- in the cmake --build command, e.g. cmake --build bindir -- -j 4 for parallel building with Makefiles. I would do this if I were using makefiles. In the present case, I'm using Microsoft VS2010. I was kind of hoping that cmake had abstracted the parallelism so that I could stay ignorant of the Visual Studio command line details and possibly in future write build scripts that are cross-platform. Are configured build scripts an option? As a project knows for which build tool it is configured, it should be able to generate a build- tool-independent build script for itself. Regards, Michael [1] http://msdn.microsoft.com/en-us/library/ms164311.aspx -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] parallel build using cmake --build?
On 11/26/2011 04:16 AM, Steve M. Robbins wrote: Hi, To build VTK on our windows build server, I wrote a small batch script that invokes cmake --build. My developer machine is multicore; is there a way to get cmake --build to run multiple jobs? Thanks, -Steve cmake --build is just a front-end for the native build tool CMake generates input for. If this tool can be invoked via the command line with options for parallel building, you can provide them after the -- in the cmake --build command, e.g. cmake --build bindir -- -j 4 for parallel building with Makefiles. Regards, Michael -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] parallel build using cmake --build?
On Fri, Nov 25, 2011 at 10:16 PM, Steve M. Robbins st...@sumost.ca wrote: Hi, To build VTK on our windows build server, I wrote a small batch script that invokes cmake --build. My developer machine is multicore; is there a way to get cmake --build to run multiple jobs? On windows, I use the following tool http://www.codeproject.com/KB/cpp/runjobs.aspx to build each configuration (Debug, Release, RelWithDebInfo ...) in parallel using separate calls to cmake --build. John -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] parallel build using cmake --build?
Hi, To build VTK on our windows build server, I wrote a small batch script that invokes cmake --build. My developer machine is multicore; is there a way to get cmake --build to run multiple jobs? Thanks, -Steve signature.asc Description: Digital signature -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake