all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon South <simon@simonsouth.net>
To: 60695@debbugs.gnu.org
Subject: [bug#60695] [PATCH 3/9] gnu: Add sanitizers-cmake.
Date: Mon,  9 Jan 2023 14:25:57 -0500	[thread overview]
Message-ID: <cdabd724a4a1fbeeac50c7886a2f8ca88019a57b.1673286570.git.simon@simonsouth.net> (raw)
In-Reply-To: <cover.1673286570.git.simon@simonsouth.net>

* gnu/packages/cmake.scm (sanitizers-cmake): New variable.
---
 gnu/packages/cmake.scm | 45 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 87fde01f63..f0d25b707d 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2023 Simon South <simon@simonsouth.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,6 +33,7 @@ (define-module (gnu packages cmake)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix deprecation)
@@ -422,3 +424,46 @@ (define-public emacs-cmake-mode
     (description "@code{cmakeos-mode} provides an Emacs major mode for editing
 Cmake files.  It supports syntax highlighting, indenting and refilling of
 comments.")))
+
+(define-public sanitizers-cmake
+  (let ((commit "a6748f4f51273d86312e3d27ebe5277c9b1ff870")
+        (revision "0"))
+    (package
+      (name "sanitizers-cmake")
+      (version (git-version "0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/arsenm/sanitizers-cmake")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0shja5qipcsxgj5v6aic9q3dik0cbahllriigwgpayv5ng3ki1ij"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list
+        #:configure-flags
+        #~(list
+           ;; Enable the "new" behavior established by CMake policy CMP0077,
+           ;; which pertains to CMake's "option()" command.  This is required
+           ;; for the package's test suite to complete successfully.
+           ;; Note this setting may become redundant with future versions of
+           ;; CMake (past 3.24.2).
+           "-DCMAKE_POLICY_DEFAULT_CMP0077=NEW")
+        #:phases
+        #~(modify-phases %standard-phases
+            ;; No install target provided; manually copy files to a suitable
+            ;; folder in the output.
+            (replace 'install
+              (lambda* (#:key source #:allow-other-keys)
+                (copy-recursively
+                 (string-append source "/cmake")
+                 (string-append #$output "/share/" #$name "/cmake")))))))
+      (synopsis "CMake module to enable sanitizers for binary targets")
+      (description "@code{sanitizers-cmake} provides a module for the CMake
+build system that can enable address, memory, thread and undefined-behavior
+sanitizers for binary targets using flags appropriate for the compiler in
+use.")
+      (home-page "https://github.com/arsenm/sanitizers-cmake")
+      (license license:expat))))
-- 
2.38.1





  parent reply	other threads:[~2023-01-09 19:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 19:22 [bug#60695] [PATCH 0/9] gnu: nextpnr-ice40: Update to 0.5 Simon South
2023-01-09 19:25 ` [bug#60695] [PATCH 1/9] gnu: Add implot Simon South
2023-01-09 19:25 ` [bug#60695] [PATCH 2/9] gnu: Add qtimgui Simon South
2023-01-09 19:25 ` Simon South [this message]
2023-01-09 19:25 ` [bug#60695] [PATCH 4/9] gnu: nextpnr-ice40: Use HTTPS for source URL Simon South
2023-01-09 19:25 ` [bug#60695] [PATCH 5/9] gnu: nextpnr-ice40: Use gexps Simon South
2023-01-09 19:26 ` [bug#60695] [PATCH 6/9] gnu: nextpnr-ice40: Enable tests Simon South
2023-01-09 19:26 ` [bug#60695] [PATCH 7/9] gnu: nextpnr-ice40: Fix generated version string Simon South
2023-01-09 19:26 ` [bug#60695] [PATCH 8/9] gnu: nextpnr-ice40: Remove bundled software Simon South
2023-01-09 19:26 ` [bug#60695] [PATCH 9/9] gnu: nextpnr-ice40: Update to 0.5 Simon South
2023-01-27 20:34 ` [bug#60695] [PATCH v2 0/9] " Simon South
2023-01-27 20:34   ` [bug#60695] [PATCH v2 1/9] gnu: Add implot Simon South
2023-01-27 20:34   ` [bug#60695] [PATCH v2 2/9] gnu: Add qtimgui Simon South
2023-01-27 20:34   ` [bug#60695] [PATCH v2 3/9] gnu: Add sanitizers-cmake Simon South
2023-01-27 20:34   ` [bug#60695] [PATCH v2 4/9] gnu: nextpnr-ice40: Use HTTPS for source URL Simon South
2023-01-27 20:34   ` [bug#60695] [PATCH v2 5/9] gnu: nextpnr-ice40: Use gexps Simon South
2023-01-27 20:34   ` [bug#60695] [PATCH v2 6/9] gnu: nextpnr-ice40: Enable tests Simon South
2023-01-27 20:34   ` [bug#60695] [PATCH v2 7/9] gnu: nextpnr-ice40: Fix generated version string Simon South
2023-01-27 20:34   ` [bug#60695] [PATCH v2 8/9] gnu: nextpnr-ice40: Remove bundled software Simon South
2023-01-27 20:34   ` [bug#60695] [PATCH v2 9/9] gnu: nextpnr-ice40: Update to 0.5 Simon South

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=cdabd724a4a1fbeeac50c7886a2f8ca88019a57b.1673286570.git.simon@simonsouth.net \
    --to=simon@simonsouth.net \
    --cc=60695@debbugs.gnu.org \
    /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.