Hi Greg,

Greg Hogan <[email protected]> skribis:

> The cmake-build-system does defer to gnu-build-system, which calls `make
> test -jN`; however, CMake generated Makefile specifies 'test' as a single
> target (the Ninja generator suffers from the same issue) so `ctest` is run
> without parallelism.
>
> To run CMake tests with parallelism the cmake-build-system should directly
> call `ctest` with the configured parallelism (same '-jN' argument). The
> cmake-build-system's check method is essentially untouched from March, 2013
> (commit c6bded8a) so this issue has existed from the beginning.

OK, got it.

> I made an inelegant patch to my local guix repo, essentially replacing
> cmake-build-system:check with a copy of gnu-build-system:check and changing
> 'apply invoke "make" test-target' to 'apply invoke "ctest"'. This works,
> although the package I was working on requires parallel tests to be
> disabled. Once the expectation is set that code will be run serially it is
> difficult to change the default to parallel execution.
>
> It seems that we should at a minimum document the issue in
> cmake-build-system:check. We could patch cmake-build-system to enable test
> parallelism and explicitly disable that setting for packages which succeed
> before but fail after making the change. What do you think?

I think we could make the change you made—running ‘ctest’—in
‘core-updates’.  If it turns out to be safer, we can have
#:parallel-build? default to #f at the beginning in
‘cmake-build-system’.

How does that sound?

Thanks,
Ludo’.

Reply via email to