all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: 69554@debbugs.gnu.org
Subject: [bug#69554] [PATCH v2] build-system: cmake: Build tests depending on `#:tests?`.
Date: Mon, 15 Jul 2024 11:40:41 +0200	[thread overview]
Message-ID: <87ed7v0z8m.fsf@gnu.org> (raw)
In-Reply-To: <7676fd973fa640750306df216feb95c335b345de.1709593063.git.h.goebel@crazy-compilers.com> (Hartmut Goebel's message of "Mon, 4 Mar 2024 23:58:32 +0100")

Hi Hartmut,

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> * guix/build/cmake-build-system.scm (configure): New paremeter `#:tests?`.
>   Add cmake option "-DBUILD_TESTING=" with value "ON" or "OFF" depending
>   on build-system argument `#:tests?`.
> * * doc/guix.texi (Inspecting Services)[cmake-build-system]: Document it.
> ---
>  doc/guix.texi                     | 10 ++++++++++
>  guix/build/cmake-build-system.scm |  7 ++++++-
>  2 files changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 87fe9f803c..409d076d12 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -9617,6 +9617,16 @@ parameter specifies in abstract terms the flags passed to the compiler;
>  it defaults to @code{"RelWithDebInfo"} (short for ``release mode with
>  debugging information''), which roughly means that code is compiled with
>  @code{-O2 -g}, as is the case for Autoconf-based packages by default.
> +
> +Depending on the @code{#:tests?} parameter, the configure-flag
> +@code{BUILD_TESTING} is set to @code{ON} resp. @code{OFF}.
> +@code{BUILD_TESTING} is a
> +@url{https://cmake.org/cmake/help/v3.28/module/CTest.html, standard
> +defined by CMake} to enable or disable building tests.  This aims to
> +save build time if tests are not run anyway, while trying to ensure
> +tests are build if they should be run.  Anyhow, the CMakeLists.txt needs
> +to implement handling this flag.

My understanding is that ‘BUILD_TESTING’ is not standard, as the last
sentence above suggests.  Thus I’m reluctant to passing this flag
unconditionally, as I guess it would fail for ‘CMakeLists.txt’ that do
not implement it, right?

Thanks,
Ludo’.




  reply	other threads:[~2024-07-15  9:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 21:48 [bug#69554] [PATCH] build-system: cmake: Build tests depending on `#:tests?` Hartmut Goebel
2024-03-04 22:58 ` [bug#69554] [PATCH v2] " Hartmut Goebel
2024-07-15  9:40   ` Ludovic Courtès [this message]
2024-07-16 15:36     ` Hartmut Goebel
2024-10-07 15:45       ` Greg Hogan
2024-10-08  9:06         ` Hartmut Goebel
2024-10-08 17:19           ` Greg Hogan
2024-10-09  7:32             ` Hartmut Goebel
2024-10-09 15:04               ` Greg Hogan
2024-10-15  9:17                 ` bug#69554: " Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ed7v0z8m.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=69554@debbugs.gnu.org \
    --cc=h.goebel@crazy-compilers.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.