[CMake] One target being built several times during parallel build
Denis Scherbakov
denis_scherbakov at yahoo.com
Thu Jun 18 09:44:22 EDT 2009
> > Could you suggest, how to prevent users from trying to
> compile two targets
> > at a time? I think this is a MAJOR bug.
>
> Since no one has been motivated enough to address it in the
> 9 year history
> of the project I wouldn't consider it a showstopping
> bug. Besides, even
> if one tries this the build should still complete
> successfully...just with
> some waste.
Just an example of what I've seen:
1. Process A starts to compile File.cpp
2. Process B starts to compile File.cpp
3. Process B removes File.o to create a new File.o
4. Process B creates File.o
5. Process A removes File.o to create a new File.o
6. Process B calls AR to create archive, but File.o is absent.
7. Process A creates File.o
> This has not caused me any trouble on gentoo and also the waste can be
> reduced if the user has ccache enabled which IMO should be enabled on
> most gentoo boxes since you build the entire os and all software from
> source. ccache saves an enormous amount of time installing upgrades
> and patches since most of the files will not change.
It has nothing to do with Gentoo. I use ccache already.
Denis
More information about the CMake
mailing list