diff options
author | Ludovic Courtès <[email protected]> | 2023-04-20 15:53:01 +0200 |
---|---|---|
committer | Ludovic Courtès <[email protected]> | 2023-04-20 15:53:43 +0200 |
commit | 4a51c88da8465b57f1f9a1f269d6edd2de171ff4 (patch) | |
tree | a8652312c3c8d352b75034836a013ee09442dee9 /gnu/packages/cpp.scm | |
parent | c0ac055918ec1eee53c7e14f62c2e3516321588b (diff) |
gnu: abseil-cpp: Add variant for C++11.
* gnu/packages/cpp.scm (abseil-cpp-for-c++-standard): New procedure.
(abseil-cpp-cxxstd17): Use it.
(abseil-cpp-cxxstd11): New variable.
Diffstat (limited to 'gnu/packages/cpp.scm')
-rw-r--r-- | gnu/packages/cpp.scm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 3e52b4ec78..18a09b1bf6 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2017 Ethan R. Jones <[email protected]> ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <[email protected]> ;;; Copyright © 2018 Fis Trivial <[email protected]> -;;; Copyright © 2018, 2021 Ludovic Courtès <[email protected]> +;;; Copyright © 2018, 2021, 2023 Ludovic Courtès <[email protected]> ;;; Copyright © 2019, 2020, 2022 Mathieu Othacehe <[email protected]> ;;; Copyright © 2019 Pierre Neidhardt <[email protected]> ;;; Copyright © 2019 Jan Wielkiewicz <[email protected]> @@ -1091,14 +1091,22 @@ Google's C++ code base.") `(cons* "-DABSL_BUILD_TESTING=ON" (delete "-DABSL_RUN_TESTS=ON" ,flags)))))))) -(define-public abseil-cpp-cxxstd17 +(define (abseil-cpp-for-c++-standard version) (let ((base abseil-cpp)) (hidden-package (package/inherit base (arguments (substitute-keyword-arguments (package-arguments base) ((#:configure-flags flags) - #~(cons* "-DCMAKE_CXX_STANDARD=17" #$flags)))))))) + #~(cons* #$(string-append "-DCMAKE_CXX_STANDARD=" + (number->string version)) + #$flags)))))))) + +(define-public abseil-cpp-cxxstd17 + (abseil-cpp-for-c++-standard 17)) ;XXX: the default with GCC 11? + +(define-public abseil-cpp-cxxstd11 + (abseil-cpp-for-c++-standard 11)) (define-public pegtl (package |