On Wed, Dec 12, 2012 at 06:21:43PM -0600, Amit Kulkarni wrote:
> >> > I thought you guys were talking about building cmake proper in parallel.
> >>
> >> We did.  cmake proper first builds a minimal bootstrap cmake, then
> >> rebuilds itself with it, so getting cmake proper to build in parallel
> >> *is* the same problem as getting any other cmake-using port to build
> >> in parallel.
> >>
> >> > Anyways, there are TWO distinct points:
> >> > - problems with make -j.
> >> > - cmake not writing correct makefiles for parallel building without 
> >> > gmake.
> >>
> >> The problem isn't that make -j fails with cmake.  The build succeeds
> >> just fine.  The problem is that with our make there is no parallelism.
> >> It's as if the -j was ignored.
> >
> > It's likely that cmake decides (arbitrarily) things don't work without 
> > gmake.
> > Since there is some recursive makefiles involved, it probably strips the
> > extra stuff early on...
> 
> i could not see any gmake specific code when i grepped in the cmake codebase.
> 
> i can confirm what naddy@ sees, when i cd ${WRKBUILD} && make -j4, i
> see only 1 core being used. but if i use gmake -j4 all cores are used.
> our make is ignoring -j but what is confusing is that: just before
> building, in bootstrapping with --parallel, it uses -j successfully.

No, our make is not ignoring -j, and it's passed to submakes. Using standard
posix mechanisms. That is, it's passed through the environment, using
MAKEFLAGS.

There are two ways to defeat that mechanism: either by explicitly wiping
out the environment, or by passing another -j somewhere.

cmake is probably doing either of those.

If you think make does not pass -j to submakes by default, you're confused,
again, or you explain yourself poorly.

Reply via email to