[CMake] One target being built several times during parallel build

Denis Scherbakov denis_scherbakov at yahoo.com
Thu Jun 18 05:06:50 EDT 2009


>> 6. gmake -j5 mytest printf
>> 7. I observe target PUTS being built 2 times and "Building CXX object
>> puts/CMakeFiles/puts.dir/puts.cpp.o" 2 times. Also counter goes to 150%.

> Your project looks fine.

> I missed in your earlier post that you ran "gmake -j9 E1 E2 E3".
> The problem is that the Makefiles that CMake generates do not
> support parallel builds with multiple targets on the command line.
> (I don't remember the reason off the top of my head, but I think
> there was a conflict between this and some other features that
> were deemed more important.)

> Parallel builds work very well as long as only one initial target
> is specified.  You can also specify no initial target and it will
> build all targets with maximum possible parallelism.

Brad, could you please, ask someone who knows about this problem in detail
what is this more important feature and why it is not possible
to fix this bug?

Could you suggest, how to prevent users from trying to compile two targets
at a time? I think this is a MAJOR bug.

Denis


      


More information about the CMake mailing list