Received: (at 69554) by debbugs.gnu.org; 15 Jul 2024 09:43:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 15 05:43:13 2024 Received: from localhost ([127.0.0.1]:59049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sTIEj-0003VO-Hd for submit <at> debbugs.gnu.org; Mon, 15 Jul 2024 05:43:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1sTIEh-0003VB-Hp for 69554 <at> debbugs.gnu.org; Mon, 15 Jul 2024 05:43:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1sTICS-0004z7-V9; Mon, 15 Jul 2024 05:40:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=PDt8ye9JgVD/bMgDkOnaLB5WZb6lxRGn/8iKxyw7o8w=; b=iXD9mUSJB+agHVCroSI8 Oijaeuh7zCvEZRomS5nEad9+8Dz0NzRwA8K6gHFkDgvteR+uXVcr/BhDlu8FayCkXE8jLWTV1bTFv rSexb/alndLPyawrEbQoy6mT2yhO2ud8M5bXzrjOuh5OnaY4aXsI5tXv5xLY0bWbyzGN8RPEKn23S NfbfQ0Z/3w3tnXPANv1w0SmToLf4rh/HLAT/eTA9eKhrTAcly8tmlKudqo0Dq8viUypV9lliPVN8K Aj21NxaXllleFlgnTP00juk7hCOQw9tQb86x4joZm9M3kYsf4FsGkoq1NmrO4D07m30OlhUGgbVzV 7RunzrOVEQEmzA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Hartmut Goebel <h.goebel@HIDDEN> Subject: Re: [bug#69554] [PATCH v2] build-system: cmake: Build tests depending on `#:tests?`. In-Reply-To: <7676fd973fa640750306df216feb95c335b345de.1709593063.git.h.goebel@HIDDEN> (Hartmut Goebel's message of "Mon, 4 Mar 2024 23:58:32 +0100") References: <b1d275cf773efa2cc9898f4439e4e5a7aac0af90.1709588880.git.h.goebel@HIDDEN> <7676fd973fa640750306df216feb95c335b345de.1709593063.git.h.goebel@HIDDEN> Date: Mon, 15 Jul 2024 11:40:41 +0200 Message-ID: <87ed7v0z8m.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69554 Cc: 69554 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi Hartmut, Hartmut Goebel <h.goebel@HIDDEN> skribis: > * guix/build/cmake-build-system.scm (configure): New paremeter `#:tests?`. > Add cmake option "-DBUILD_TESTING=3D" 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 pa= ssed 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 =E2=80=98BUILD_TESTING=E2=80=99 is not standard, a= s the last sentence above suggests. Thus I=E2=80=99m reluctant to passing this flag unconditionally, as I guess it would fail for =E2=80=98CMakeLists.txt=E2=80= =99 that do not implement it, right? Thanks, Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#69554
; Package guix-patches
.
Full text available.Received: (at 69554) by debbugs.gnu.org; 4 Mar 2024 22:59:13 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 04 17:59:12 2024 Received: from localhost ([127.0.0.1]:45223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rhHH6-0007vJ-FK for submit <at> debbugs.gnu.org; Mon, 04 Mar 2024 17:59:12 -0500 Received: from mail02.noris.net ([62.128.1.232]:44451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <h.goebel@HIDDEN>) id 1rhHH1-0007ut-2s for 69554 <at> debbugs.gnu.org; Mon, 04 Mar 2024 17:59:11 -0500 Received: from p57b08d98.dip0.t-ipconnect.de ([87.176.141.152] helo=hermia.goebel-consult.de) by mail02.noris.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) (envelope-from <h.goebel@HIDDEN>) id 1rhHGV-0006lq-UA for 69554 <at> debbugs.gnu.org; Mon, 04 Mar 2024 23:58:35 +0100 Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id C52AC5F4DE; Mon, 4 Mar 2024 23:58:32 +0100 (CET) From: Hartmut Goebel <h.goebel@HIDDEN> To: 69554 <at> debbugs.gnu.org Subject: [PATCH v2] build-system: cmake: Build tests depending on `#:tests?`. Date: Mon, 4 Mar 2024 23:58:32 +0100 Message-ID: <7676fd973fa640750306df216feb95c335b345de.1709593063.git.h.goebel@HIDDEN> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Noris-IP: 87.176.141.152 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69554 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) * 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. + @end defvar @defvar composer-build-system diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm index d1ff5071be..3f5449c438 100644 --- a/guix/build/cmake-build-system.scm +++ b/guix/build/cmake-build-system.scm @@ -33,7 +33,7 @@ (define-module (guix build cmake-build-system) ;; Code: (define* (configure #:key outputs (configure-flags '()) (out-of-source? #t) - build-type target + (tests? #t) build-type target #:allow-other-keys) "Configure the given package." (let* ((out (assoc-ref outputs "out")) @@ -62,6 +62,11 @@ (define* (configure #:key outputs (configure-flags '()) (out-of-source? #t) ,(string-append "-DCMAKE_INSTALL_RPATH=" out "/lib") ;; enable verbose output from builds "-DCMAKE_VERBOSE_MAKEFILE=ON" + ;; ask for (not) building tests depending on #:tests? + ;; (CMakeLists.txt may or may not implement this check) + ,@(if tests? + '("-DBUILD_TESTING=ON") ; overwrite any default option + '("-DBUILD_TESTING=OFF")) ; not run anyway ;; Cross-build ,@(if target base-commit: 3da49b1472919a62df1fe399638f23a246aa325d -- 2.41.0
guix-patches@HIDDEN
:bug#69554
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 4 Mar 2024 21:49:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 04 16:49:39 2024 Received: from localhost ([127.0.0.1]:45072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rhGBm-0003Ns-LF for submit <at> debbugs.gnu.org; Mon, 04 Mar 2024 16:49:39 -0500 Received: from lists.gnu.org ([209.51.188.17]:52464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <h.goebel@HIDDEN>) id 1rhGBi-0003NW-2p for submit <at> debbugs.gnu.org; Mon, 04 Mar 2024 16:49:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <h.goebel@HIDDEN>) id 1rhGBD-0007UC-U4 for guix-patches@HIDDEN; Mon, 04 Mar 2024 16:49:03 -0500 Received: from mail01.noris.net ([62.128.1.221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <h.goebel@HIDDEN>) id 1rhGBA-0005Fn-BN for guix-patches@HIDDEN; Mon, 04 Mar 2024 16:49:03 -0500 Received: from p57b08d98.dip0.t-ipconnect.de ([87.176.141.152] helo=hermia.goebel-consult.de) by mail01.noris.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) (envelope-from <h.goebel@HIDDEN>) id 1rhGB4-0003zV-Tn for guix-patches@HIDDEN; Mon, 04 Mar 2024 22:48:54 +0100 Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id B53515F4DE; Mon, 4 Mar 2024 22:48:51 +0100 (CET) From: Hartmut Goebel <h.goebel@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH] build-system: cmake: Build tests depending on `#:tests?`. Date: Mon, 4 Mar 2024 22:48:51 +0100 Message-ID: <b1d275cf773efa2cc9898f4439e4e5a7aac0af90.1709588880.git.h.goebel@HIDDEN> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Noris-IP: 87.176.141.152 Received-SPF: pass client-ip=62.128.1.221; envelope-from=h.goebel@HIDDEN; helo=mail01.noris.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) * 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. + @end defvar @defvar composer-build-system diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm index d1ff5071be..71e8ca8a83 100644 --- a/guix/build/cmake-build-system.scm +++ b/guix/build/cmake-build-system.scm @@ -33,7 +33,7 @@ (define-module (guix build cmake-build-system) ;; Code: (define* (configure #:key outputs (configure-flags '()) (out-of-source? #t) - build-type target + (tests? #t) build-type target #:allow-other-keys) "Configure the given package." (let* ((out (assoc-ref outputs "out")) @@ -62,6 +62,11 @@ (define* (configure #:key outputs (configure-flags '()) (out-of-source? #t) ,(string-append "-DCMAKE_INSTALL_RPATH=" out "/lib") ;; enable verbose output from builds "-DCMAKE_VERBOSE_MAKEFILE=ON" + ;; ask for (not) building tests depending on #:tests? + ;; (CMakeLists.txt may or may not implement this check) + ,@(if tests? + '("-DBUILD_TESTING=OFF") ; not run anyway + '("-DBUILD_TESTING=ON")) ; overwrite any default option ;; Cross-build ,@(if target base-commit: 3da49b1472919a62df1fe399638f23a246aa325d -- 2.41.0
Hartmut Goebel <h.goebel@HIDDEN>
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#69554
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.