Andre McCurdy | 1ea3f66 | 2016-12-15 06:11:31 -0800 | [diff] [blame] | 1 | DESCRIPTION = "Google's framework for writing C++ tests" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 2 | HOMEPAGE = "https://github.com/google/googletest" |
Andre McCurdy | 1ea3f66 | 2016-12-15 06:11:31 -0800 | [diff] [blame] | 3 | SECTION = "libs" |
| 4 | LICENSE = "BSD-3-Clause" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a" |
Andre McCurdy | 1ea3f66 | 2016-12-15 06:11:31 -0800 | [diff] [blame] | 6 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 7 | PROVIDES += "gmock gtest" |
Andre McCurdy | 1ea3f66 | 2016-12-15 06:11:31 -0800 | [diff] [blame] | 8 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 9 | S = "${WORKDIR}/git" |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 10 | SRCREV = "f8d7d77c06936315286eb55f8de22cd23c188571" |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 11 | SRC_URI = "git://github.com/google/googletest.git;branch=main;protocol=https" |
Andre McCurdy | 1ea3f66 | 2016-12-15 06:11:31 -0800 | [diff] [blame] | 12 | |
Patrick Williams | b58112e | 2024-03-07 11:16:36 -0600 | [diff] [blame] | 13 | inherit cmake pkgconfig |
| 14 | |
| 15 | # allow for shared libraries, but do not default to them |
| 16 | # |
| 17 | PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," |
| 18 | |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 19 | CXXFLAGS:append = " -fPIC" |
Andre McCurdy | 1ea3f66 | 2016-12-15 06:11:31 -0800 | [diff] [blame] | 20 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 21 | ALLOW_EMPTY:${PN} = "1" |
| 22 | ALLOW_EMPTY:${PN}-dbg = "1" |
Andre McCurdy | 1ea3f66 | 2016-12-15 06:11:31 -0800 | [diff] [blame] | 23 | |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 24 | # -staticdev will not be implicitly put into an SDK, so we add an rdepend |
| 25 | # if we are not building shared libraries |
| 26 | # |
| 27 | RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG","shared","","${PN}-staticdev",d)}" |
Andre McCurdy | 1ea3f66 | 2016-12-15 06:11:31 -0800 | [diff] [blame] | 28 | |
| 29 | BBCLASSEXTEND = "native nativesdk" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 30 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | do_configure:prepend() { |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 32 | # explicitly use python3 |
| 33 | # the scripts are already python3 compatible since https://github.com/google/googletest/commit/d404af0d987a9c38cafce82a7e26ec8468c88361 and other fixes like this |
| 34 | # but since this oe-core change http://git.openembedded.org/openembedded-core/commit/?id=5f8f16b17f66966ae91aeabc23e97de5ecd17447 |
| 35 | # there isn't python in HOSTTOOLS so "env python" fails |
Patrick Williams | 5877637 | 2022-04-13 09:07:35 -0500 | [diff] [blame] | 36 | sed -i 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@g' ${S}/googlemock/test/*py ${S}/googletest/test/*py |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 37 | } |