<div dir="ltr"><div>The easiest option with visual studio is to use the /mp compiler flag by setting it in the CFLAGS and CXXFLAGS environment variables in your ctest script. This will parallelize each target across all CPUs. Target-level parallelism may or may not also happen since that's dependent on your local configuration and VS version; Older versions used devenv.exe to drive the build, in which case it's target-level parallelism is only configurable through the IDE, where as newer VS versions can be driven with MSBuild directly and use the /maxcpucount:N switch in the CTEST_BUILD_FLAGS.<br><br></div>Unfortunately on Windows and VS builds there's not really a simple answer.<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">- Chuck<br></div></div>
<br><br><div class="gmail_quote">On Fri, Sep 5, 2014 at 11:09 AM, Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>
<br>
Thanks<br>
Mike Jackson<br>
<a href="http://dream3d.bluequartz.net" target="_blank">dream3d.bluequartz.net</a><br>
<a href="http://github.com/dream3d/dream3d" target="_blank">github.com/dream3d/dream3d</a><br>
<div class="HOEnZb"><div class="h5"><br>
On Sep 5, 2014, at 9:33 AM, Chuck Atkins <<a href="mailto:chuck.atkins@kitware.com">chuck.atkins@kitware.com</a>> wrote:<br>
<br>
><br>
> 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.<br>
><br>
> 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":<br>
><br>
> ...<br>
> set(CTEST_SITE "<a href="http://wopr.kitwarein.com" target="_blank">wopr.kitwarein.com</a>")<br>
> set(CTEST_BUILD_NAME "Fedora20_Intel-2013-SP1-U3")<br>
> set(CTEST_BUILD_CONFIGURATION Release)<br>
> set(CTEST_CMAKE_GENERATOR "Unix Makefiles")<br>
> set(CTEST_BUILD_FLAGS -j8)<br>
> ...<br>
><br>
> 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?<br>
</div></div><div class="HOEnZb"><div class="h5">> --<br>
><br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
><br>
> CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>