diff options
-rw-r--r-- | gnu/packages/cpp.scm | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 8b32c3f0a9..dba9ec75f6 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl> ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz> +;;; Copyright © 2020 Roel Janssen <roel@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -439,3 +440,47 @@ create fluid interpolations when animating position, scale, rotation, frames or other values of screen objects, by setting their values as the tween starting point and then, after each tween step, plugging back the result.") (license license:expat))) + +(define-public abseil-cpp + (package + (name "abseil-cpp") + (version "20200225") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/abseil/abseil-cpp.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0wb04pszzrl39ny1pz9jvvq8lbbm355dd60jspcyqfwxnk6njgd1")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON" + "-DABSL_RUN_TESTS=ON" + ;; Needed, else we get errors like: + ;; + ;; ld: CMakeFiles/absl_periodic_sampler_test.dir/internal/periodic_sampler_test.cc.o: + ;; undefined reference to symbol '_ZN7testing4Mock16UnregisterLockedEPNS_8internal25UntypedFunctionMockerBaseE' + ;; ld: /gnu/store/bxapb1f1l8frjpbjckk3zdxhmcig3xzk-googletest-1.10.0/lib/libgmock.so: + ;; error adding symbols: DSO missing from command line + ;; collect2: error: ld returned 1 exit status + "-DCMAKE_EXE_LINKER_FLAGS=-lgtest -lpthread -lgmock") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'remove-gtest-check + ;; The CMakeLists fails to find our googletest for some reason, but + ;; it works nonetheless. + (lambda _ + (substitute* "CMakeLists.txt" + (("check_target\\(gtest\\)") "") + (("check_target\\(gtest_main\\)") "") + (("check_target\\(gmock\\)") ""))))))) + (native-inputs + `(("googletest" ,googletest))) + (home-page "https://abseil.io") + (synopsis "Augmented C++ standard library") + (description "Abseil is a collection of C++ library code designed to +augment the C++ standard library. The Abseil library code is collected from +Google's C++ code base.") + (license license:asl2.0))) |