guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add cli11.


From: guix-commits
Subject: branch master updated: gnu: Add cli11.
Date: Sun, 21 Feb 2021 04:16:14 -0500

This is an automated email from the git hooks/post-receive script.

ngz pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new f129ca0  gnu: Add cli11.
f129ca0 is described below

commit f129ca0b181f2f08e8b7c9c263ad2520a4ef717d
Author: Milkey Mouse <milkeymouse@meme.institute>
AuthorDate: Sat Feb 20 17:17:28 2021 -0800

    gnu: Add cli11.
    
    * gnu/packages/cpp.scm (cli11): New variable.
    
    Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
---
 gnu/packages/cpp.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 331afc2..abb50d8 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
 ;;; Copyright © 2020, 2021 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
+;;; Copyright © 2020 Milkey Mouse <milkeymouse@meme.institute>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -40,6 +41,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
+  #:use-module (guix modules)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
@@ -903,3 +905,51 @@ provides a number of utilities to make coding with 
expected cleaner.")
     (description "Magic Enum offers static reflection of enums, with
 conversions to and from strings, iteration and related functionality.")
     (license license:expat)))
+
+(define-public cli11
+  (package
+    (name "cli11")
+    (version "1.9.1")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/CLIUtils/CLI11";)
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "0hbch0vk8irgmiaxnfqlqys65v1770rxxdfn3d23m2vqyjh0j9l6"))
+        (modules '((guix build utils)))
+        (snippet
+         '(begin (delete-file-recursively "extern")
+                 #t))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       '("-DCLI11_SINGLE_FILE=OFF"
+         "-DCLI11_BUILD_EXAMPLES=OFF")
+       #:imported-modules ,(append %cmake-build-system-modules
+                                   (source-module-closure '((guix utils))))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'no-vendor-gtest
+           (lambda _
+             (use-modules (guix utils))
+             (substitute* "tests/CMakeLists.txt"
+               ;; We provide our own googletest, so this is not really a 
problem.
+               (("message\\(FATAL_ERROR \"You have requested tests be built, 
but googletest is not downloaded." msg)
+                 (string-replace-substring msg "FATAL_ERROR" "TRACE")))
+             (substitute* "cmake/AddGoogletest.cmake"
+               (("^add_subdirectory\\(.*googletest.*$") "find_package(GTest 
REQUIRED)")
+               (("^set_target_properties\\(gtest gtest_main gmock gmock_main") 
"")
+               (("^    PROPERTIES FOLDER \"Extern\"\\)") ""))
+             #t)))))
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("googletest" ,googletest)))
+    (synopsis "Command line parser for C++11")
+    (description
+     "CLI11 is a command line parser for C++11 and beyond that provides a rich
+feature set with a simple and intuitive interface.")
+    (home-page "https://cliutils.github.io/CLI11/book/";)
+    (license license:bsd-3)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]