GNU bug report logs -
#69554
[PATCH] build-system: cmake: Build tests depending on `#:tests?`.
Previous Next
Full log
Message #11 received at 69554 <at> debbugs.gnu.org (full text, mbox):
Hi Hartmut,
Hartmut Goebel <h.goebel <at> 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’.
This bug report was last modified 278 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.