Your message dated Fri, 26 Jan 2024 20:17:27 +0100
with message-id <[email protected]>
and subject line Re: [PATCH] cmake: set -DBUILD_TESTING=OFF for nocheck builds
has caused the Debian Bug report #1036654,
regarding [PATCH] cmake: set -DBUILD_TESTING=OFF for nocheck builds
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1036654: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1036654
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: debhelper
Tags: patch
X-Debbugs-Cc: jspricke%40debian.org, [email protected]

Hi Niels et al,

I noticed that disabling CTest for nocheck is a recurring pattern.
Rather than patch lots of packages, maybe we could automate that in some
central tool? I'm attaching a patch for your convenience.

Helmut

---
 debhelper-compat-upgrade-checklist.pod    | 5 +++++
 lib/Debian/Debhelper/Buildsystem/cmake.pm | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/debhelper-compat-upgrade-checklist.pod 
b/debhelper-compat-upgrade-checklist.pod
index e9965258..1ddeba7e 100644
--- a/debhelper-compat-upgrade-checklist.pod
+++ b/debhelper-compat-upgrade-checklist.pod
@@ -107,6 +107,11 @@ B<cmake --install>, respectively, instead of B<ninja 
install> and B<make install
 in the L<dh_auto_install(1)> call.  Any override of B<dh_auto_install> that
 passes extra parameters to the upstream build system should be reviewed.
 
+=item -
+
+The B<cmake> build system passes B<< -DBUILD_TESTING:BOOL=OFF >> to B<cmake>
+if B<DEB_BUILD_OPTIONS> contains B<nocheck> thus disabling CTest.
+
 =back
 
 =item v13
diff --git a/lib/Debian/Debhelper/Buildsystem/cmake.pm 
b/lib/Debian/Debhelper/Buildsystem/cmake.pm
index c4a2ad9c..2b793939 100644
--- a/lib/Debian/Debhelper/Buildsystem/cmake.pm
+++ b/lib/Debian/Debhelper/Buildsystem/cmake.pm
@@ -135,6 +135,10 @@ sub configure {
                $ENV{CXXFLAGS} .= ' ' . $ENV{CPPFLAGS};
        }
 
+       if (get_buildoption("nocheck") && ! compat(13)) {
+               push(@flags, "-DBUILD_TESTING:BOOL=OFF");
+       }
+
        $this->mkdir_builddir();
        eval { 
                $this->doit_in_builddir("cmake", @flags, @_, 
$this->get_source_rel2builddir());
-- 
2.39.2

--- End Message ---
--- Begin Message ---
On Tue, 23 May 2023 22:44:49 +0200 Helmut Grohne <[email protected]> wrote:
Package: debhelper
Tags: patch
X-Debbugs-Cc: jspricke%40debian.org, [email protected]

Hi Niels et al,

I noticed that disabling CTest for nocheck is a recurring pattern.
Rather than patch lots of packages, maybe we could automate that in some
central tool? I'm attaching a patch for your convenience.

Helmut

 [...]

Already included in some previous version.

Next version will remove the compat guard as I suspect the compat guard is unnecessary in practice.

Best regards,
Niels

--- End Message ---

Reply via email to