[CMake] Ctest building with Multiple Processors

Michael Jackson mike.jackson at bluequartz.net
Fri Sep 5 11:09:56 EDT 2014


What generator? All of them of course. I am trying to setup our "build bots" on several environments including OS X, Linux and Windows. I have ninja built and installed on the Windows machine. I would _prefer_ to use Visual Studio and ninja so that we have a sanity check to make sure both types of project files can be built correctly, configured, build and the software packaged. We are eventually going to try to get "nightlies" of our software going also.

Thanks
Mike Jackson
dream3d.bluequartz.net
github.com/dream3d/dream3d

On Sep 5, 2014, at 9:33 AM, Chuck Atkins <chuck.atkins at kitware.com> wrote:

> 
> Actually my interpretation of the manual says that the _tests_ will be run in parallel. What I want is the _Build_ to be run in parallel.
> 
> Indeed that is just the parallel test execution.  Parallel build is usually generator specific, controlled through CTEST_BUILD_FLAGS.  For example: if you're using "Unix Makefiles":
> 
> ...
> set(CTEST_SITE "wopr.kitwarein.com")
> set(CTEST_BUILD_NAME "Fedora20_Intel-2013-SP1-U3")
> set(CTEST_BUILD_CONFIGURATION Release)
> set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
> set(CTEST_BUILD_FLAGS -j8)
> ...
> 
> This will call "make -j8" for the build instead of just "make".  If using the ninja generator, the build will be parallel by default, or you can specify a "-j" flag to override that number.  Visual Studio gets a bit tricky though since you can paralleling at both the target and file level so if not careful, you can end up with N^2 build processes.  What generator are you using?
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake



More information about the CMake mailing list