Signed-off-by: Roland Hieber <[email protected]>
---
 rules/googletest.in   | 41 +++++++++++++++++++++++++++
 rules/googletest.make | 66 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 107 insertions(+)
 create mode 100644 rules/googletest.in
 create mode 100644 rules/googletest.make

diff --git a/rules/googletest.in b/rules/googletest.in
new file mode 100644
index 000000000000..ab876ffd8a66
--- /dev/null
+++ b/rules/googletest.in
@@ -0,0 +1,41 @@
+## SECTION=test_suites
+
+config GOOGLETEST
+       select HOST_CMAKE
+       tristate
+       prompt "googletest"
+       help
+         Google's C++ test framework sources
+
+         Google Test is a framework for writing C++ tests on a
+         variety of platforms. Based on the xUnit
+         architecture. Supports automatic test discovery, a rich set
+         of assertions, user-defined assertions, death tests, fatal
+         and non-fatal failures, value- and type-parameterized tests,
+         various options for running the tests, and XML test report
+         generation.
+
+         Google Mock is an extension of Google Test for C++ mocking.
+         Inspired by jMock, EasyMock, and Hamcrest, and designed with
+         C++'s specifics in mind, it can help you derive better
+         designs of your system and write better tests.
+
+         Google Mock:
+
+         * provides a declarative syntax for defining mocks,
+         * can easily define partial (hybrid) mocks, which are a
+           cross of real and mock objects,
+         * handles functions of arbitrary types and overloaded
+           functions,
+         * comes with a rich set of matchers for validating function
+           arguments,
+         * uses an intuitive syntax for controlling the behavior of a
+           mock,
+         * does automatic verification of expectations (no
+           record-and-replay needed),
+         * allows arbitrary (partial) ordering constraints on
+           function calls to be expressed,
+         * lets a user extend it by defining new matchers and
+           actions.
+         * does not use exceptions, and
+         * is easy to learn and use.
diff --git a/rules/googletest.make b/rules/googletest.make
new file mode 100644
index 000000000000..7f0c54f341f6
--- /dev/null
+++ b/rules/googletest.make
@@ -0,0 +1,66 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Niklas Reisser <[email protected]>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GOOGLETEST) += googletest
+
+#
+# Paths and names
+#
+GOOGLETEST_VERSION     := 1.8.1
+GOOGLETEST_MD5         := 2e6fbeb6a91310a16efe181886c59596
+GOOGLETEST             := googletest-release-$(GOOGLETEST_VERSION)
+GOOGLETEST_SUFFIX      := tar.gz
+GOOGLETEST_URL         := 
https://github.com/google/googletest/archive/release-$(GOOGLETEST_VERSION).$(GOOGLETEST_SUFFIX)
+GOOGLETEST_SOURCE      := $(SRCDIR)/$(GOOGLETEST).$(GOOGLETEST_SUFFIX)
+GOOGLETEST_DIR         := $(BUILDDIR)/$(GOOGLETEST)
+GOOGLETEST_LICENSE     := BSD-3-Clause
+GOOGLETEST_LICENSE_FILES       := 
file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+GOOGLETEST_CONF_TOOL := cmake
+GOOGLETEST_CONF_OPT := \
+       $(CROSS_CMAKE_USR) \
+       -DBUILD_GMOCK=ON \
+       -DBUILD_SHARED_LIBS=ON \
+       -DINSTALL_GTEST=ON \
+       -Dgmock_build_tests=OFF \
+       -Dgtest_build_samples=OFF \
+       -Dgtest_build_tests=OFF \
+       -Dgtest_disable_pthreads=OFF \
+       -Dgtest_force_shared_crt=OFF \
+       -Dgtest_hide_internal_symbols=OFF
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/googletest.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, googletest)
+       @$(call install_fixup, googletest,PRIORITY,optional)
+       @$(call install_fixup, googletest,SECTION,base)
+       @$(call install_fixup, googletest,AUTHOR,"Niklas Reisser 
<[email protected]>")
+       @$(call install_fixup, googletest,DESCRIPTION,missing)
+
+       @$(call install_lib, googletest, 0,0, 0644, libgmock)
+       @$(call install_lib, googletest, 0,0, 0644, libgtest)
+       @$(call install_lib, googletest, 0,0, 0644, libgtest_main)
+       @$(call install_lib, googletest, 0,0, 0644, libgmock_main)
+
+       @$(call install_finish, googletest)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
2.29.2


_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to