GNU bug report logs - #69554
[PATCH] build-system: cmake: Build tests depending on `#:tests?`.

Previous Next

Package: guix-patches;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Mon, 4 Mar 2024 21:50:01 UTC

Severity: normal

Tags: patch

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Greg Hogan <code <at> greghogan.com>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: 69554 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: [bug#69554] [PATCH v2] build-system: cmake: Build tests depending on `#:tests?`.
Date: Mon, 7 Oct 2024 11:45:18 -0400
On Tue, Jul 16, 2024 at 11:37 AM Hartmut Goebel
<h.goebel <at> crazy-compilers.com> wrote:
>
> Am 15.07.24 um 11:40 schrieb Ludovic Courtès:
>
> 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?
>
> I just tested it, and all you get is a warning:
>
> $ cat CMakeLists.txt
> cmake_minimum_required(VERSION 3.0)
> project(doo)
> $ cmake -DBUILD_TESTING=OFF .
> …
> -- Generating done (0.0s)
> CMake Warning:
>  Manually-specified variables were not used by the project:
>
>    BUILD_TESTING
>
>
> -- Build files have been written to: /tmp/xxx

Hi Hartmut,

Could we detect with `cmake -L` [1] that the package has a
BUILD_TESTING option and only then pass this flag?

[1] https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-L-A-H

Greg




This bug report was last modified 277 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.