[CMake] Disable parallel build under windows

Matthew Woehlke matthew.woehlke at kitware.com
Wed Jun 26 11:36:37 EDT 2013


On 2013-06-26 10:01, ycollette.nospam at free.fr wrote:
> In a directory, I build some ExternalProjects.
> Under windows, if I use the "NMake Makefiles" generator, the build is sequential (thanks to nmake which doesn't understand parallel build).
> But if  I generate a Visual Studio solution, the external projects are build in parallel.
> I would like to forbid the parallel build in my ExternalProjects directory. Is it possible to do via cmake ?

If you're doing it due to dependencies, there is the DEPENDS argument to 
ExternalProject_Add to declare dependencies, which will force build order.

(Or, as Sören noted, you can just turn off parallel building altogether.)

You could also artificially make each external project depend on the 
last one to force them to build serially without having to globally 
disable parallel building.

-- 
Matthew



More information about the CMake mailing list