all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#70031] [core-updates PATCH 00/19] Use CMake in build-system/cmake.
@ 2024-03-27 14:49 Greg Hogan
  2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 01/19] build-system/cmake: Parallelize tests using ctest Greg Hogan
                   ` (19 more replies)
  0 siblings, 20 replies; 87+ messages in thread
From: Greg Hogan @ 2024-03-27 14:49 UTC (permalink / raw)
  To: 70031; +Cc: Greg Hogan

Following up on this discussion from 2+ years ago:
  https://lists.gnu.org/archive/html/guix-devel/2021-10/msg00055.html

The current cmake-build-system defers to gnu-build-system to build and
check packages. This patch adapts the cmake-build-system to use CMake
commands. The benefits include:

1) Tests can run in parallel. Make (from the gnu-build-system) treats
ctest as a single target so cannot parallelize tests. By directly
running ctest the tests are run with optional parallelism.

2) Alternative generators, namely Ninja. When configured with an
alternative generator the CMake build, check, and install commands will
use that generator and the package need not replace each phase.

The simplification can be seen in the included patch for astroid. Ninja
must still be included (both the module and native input) and the
generator specified:

  (use-modules
   (gnu packages ninja))

  (arguments
   (list #:generator "Ninja"))

  (native-inputs (list ninja))

This compares with the current requirement to override flags and phases:

  (arguments
   (list
    #:configure-flags #~(list "-GNinja")
    #:phases
    #~(modify-phases %standard-phases
        (replace 'build
          (lambda _
            (invoke "ninja" "-j" (number->string (parallel-job-count)))))
        (replace 'check
          (lambda* (#:key tests? #:allow-other-keys)
            (when tests?
              (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
              (invoke "ctest" "."))))
        (replace 'install
          (lambda _
            (invoke "ninja" "install"))))))

It would be nice to include the ninja module and ninja as a native input
by default when using the cmake-build-system, but I do not think this is
possible due to circular dependencies with Python and CMake, the two
supported build methods for Ninja.

Greg Hogan (19):
  build-system/cmake: Parallelize tests using ctest.
  build-system/cmake: Parameterize build system generator.
  build-system/cmake: Add build.
  build-system/cmake: Add install.
  gnu: libmedfile: Disable parallel tests.
  gnu: srt: Disable parallel tests.
  gnu: fish: Fix tests.
  gnu: vulkan-loader: Disable parallel tests.
  gnu: igraph: Move test target to check phase.
  gnu: inkscape: Move test target to check phase.
  gnu: vigra: Move test target to check phase.
  gnu: cpp-httplib: Disable parallel tests.
  gnu: libical: Disable parallel tests.
  gnu: astroid: Remove custom phases.
  gnu: websocketpp: Disable parallel tests.
  gnu: mbedtls-lts: Disable parallel tests.
  gnu: scotch: Disable parallel tests.
  gnu: evolution-data-server: Disable parallel tests.
  gnu: aws-c-common: Disable parallel tests.

 doc/guix.texi                     |  4 +++
 gnu/packages/c.scm                |  3 +-
 gnu/packages/calendar.scm         |  1 +
 gnu/packages/cpp.scm              |  3 +-
 gnu/packages/engineering.scm      |  3 +-
 gnu/packages/gnome.scm            |  1 +
 gnu/packages/graph.scm            |  5 +++-
 gnu/packages/image.scm            |  9 ++++--
 gnu/packages/inkscape.scm         |  8 ++++--
 gnu/packages/mail.scm             | 16 ++---------
 gnu/packages/maths.scm            |  3 +-
 gnu/packages/networking.scm       |  3 +-
 gnu/packages/shells.scm           |  5 ++++
 gnu/packages/tls.scm              |  3 +-
 gnu/packages/vulkan.scm           |  1 +
 gnu/packages/web.scm              |  3 +-
 guix/build-system/cmake.scm       |  4 +++
 guix/build/cmake-build-system.scm | 46 +++++++++++++++++++++++++------
 18 files changed, 85 insertions(+), 36 deletions(-)


base-commit: 656baadf83f2812c0ff79f4f2f0b5f1e927ed8a5
-- 
2.44.0





^ permalink raw reply	[flat|nested] 87+ messages in thread

end of thread, other threads:[~2024-10-22 19:02 UTC | newest]

Thread overview: 87+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-27 14:49 [bug#70031] [core-updates PATCH 00/19] Use CMake in build-system/cmake Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 01/19] build-system/cmake: Parallelize tests using ctest Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 02/19] build-system/cmake: Parameterize build system generator Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 03/19] build-system/cmake: Add build Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 04/19] build-system/cmake: Add install Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 05/19] gnu: libmedfile: Disable parallel tests Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 06/19] gnu: srt: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 07/19] gnu: fish: Fix tests Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 08/19] gnu: vulkan-loader: Disable parallel tests Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 09/19] gnu: igraph: Move test target to check phase Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 10/19] gnu: inkscape: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 11/19] gnu: vigra: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 12/19] gnu: cpp-httplib: Disable parallel tests Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 13/19] gnu: libical: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 14/19] gnu: astroid: Remove custom phases Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 15/19] gnu: websocketpp: Disable parallel tests Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 16/19] gnu: mbedtls-lts: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 17/19] gnu: scotch: " Greg Hogan
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 18/19] gnu: evolution-data-server: " Greg Hogan
2024-03-31  0:36   ` Maxim Cournoyer
2024-03-27 14:52 ` [bug#70031] [core-updates PATCH 19/19] gnu: aws-c-common: " Greg Hogan
2024-10-22 18:08 ` [bug#70031] [PATCH v2 00/65] Use CMake in build-system/cmake Greg Hogan
2024-10-22 18:08   ` [bug#70031] [PATCH v2 01/65] build-system/cmake: Parallelize tests using ctest Greg Hogan
2024-10-22 18:08   ` [bug#70031] [PATCH v2 02/65] build-system/cmake: Add generator fields Greg Hogan
2024-10-22 18:08   ` [bug#70031] [PATCH v2 03/65] build-system/qt: " Greg Hogan
2024-10-22 18:08   ` [bug#70031] [PATCH v2 04/65] build-system/cmake: Add generator Greg Hogan
2024-10-22 18:08   ` [bug#70031] [PATCH v2 05/65] build-system/cmake: Add build Greg Hogan
2024-10-22 18:08   ` [bug#70031] [PATCH v2 06/65] build-system/cmake: Add install Greg Hogan
2024-10-22 18:08   ` [bug#70031] [PATCH v2 07/65] build-system/cmake: Add test-exclude fields Greg Hogan
2024-10-22 18:08   ` [bug#70031] [PATCH v2 08/65] build-system/qt: " Greg Hogan
2024-10-22 18:08   ` [bug#70031] [PATCH v2 09/65] build-system/cmake: Add test exclusion Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 10/65] build-system/cmake: Optionally build tests Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 11/65] build-system/cmake: Include ninja Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 12/65] build-system/qt: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 13/65] gnu: astroid: Remove custom phases Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 14/65] gnu: rdma-core: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 15/65] gnu: fish: Fix tests Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 16/65] gnu: igraph: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 17/65] gnu: inkscape: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 18/65] gnu: inkscape/stable: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 19/65] gnu: kirigami: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 20/65] gnu: kirigami-5: Disable tests Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 21/65] gnu: vigra: Fix tests Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 22/65] gnu: cpp-httplib: Disable parallel tests Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 23/65] gnu: evolution-data-server: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 24/65] gnu: kservice: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 25/65] gnu: libical: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 26/65] gnu: libmedfile: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 27/65] gnu: mbedtls-lts: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 28/65] gnu: scotch: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 29/65] gnu: srt: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 30/65] gnu: vulkan-loader: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 31/65] gnu: websocketpp: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 32/65] gnu: dbus-cxx: Use #:test-exclude Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 33/65] gnu: hotspot: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 34/65] gnu: kconfig-5: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 35/65] gnu: nextcloud-client: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 36/65] gnu: pdal: Use :#test-exclude and disable parallel tests Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 37/65] gnu: qxmpp: Use #:test-exclude Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 38/65] gnu: simgear: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 39/65] gnu: cmake: Update to 3.30.5 Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 40/65] gnu: asymptote: Pin CMake dependency Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 41/65] gnu: conan: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 42/65] gnu: entangle: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 43/65] gnu: go-mvdan-cc-editorconfig: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 44/65] gnu: libdecor: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 45/65] gnu: liblxi: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 46/65] gnu: lxi-tools: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 47/65] gnu: pantheon-calculator: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 48/65] gnu: pantheon-calendar: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 49/65] gnu: python-awkward-cpp: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 50/65] gnu: python-contourpy: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 51/65] gnu: python-keystone-engine: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 52/65] gnu: python-lief: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 53/65] gnu: python-optree: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 54/65] gnu: python-pivy: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 55/65] gnu: python-pytorch: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 56/65] gnu: python-symengine: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 57/65] gnu: raider: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 58/65] gnu: siril: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 59/65] gnu: soqt: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 60/65] gnu: syndication-domination: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 61/65] gnu: tigervnc-server: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 62/65] gnu: trinityrnaseq: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 63/65] gnu: unicorn: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 64/65] gnu: wavbreaker: " Greg Hogan
2024-10-22 18:09   ` [bug#70031] [PATCH v2 65/65] gnu: xffm+: " Greg Hogan

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.