xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-test/googletest/googletest_git.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1DESCRIPTION = "Google's framework for writing C++ tests"
2HOMEPAGE = "https://github.com/google/googletest"
3SECTION = "libs"
4LICENSE = "BSD-3-Clause"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a"
6
7PV = "1.11.0+git${SRCPV}"
8
9PROVIDES += "gmock gtest"
10
11S = "${WORKDIR}/git"
12SRCREV = "9e712372214d75bb30ec2847a44bf124d48096f3"
13SRC_URI = "git://github.com/google/googletest.git;branch=main;protocol=https"
14
15inherit cmake
16
17ALLOW_EMPTY:${PN} = "1"
18ALLOW_EMPTY:${PN}-dbg = "1"
19
20RDEPENDS:${PN}-dev += "${PN}-staticdev"
21
22BBCLASSEXTEND = "native nativesdk"
23
24do_configure:prepend() {
25    # explicitly use python3
26    # the scripts are already python3 compatible since https://github.com/google/googletest/commit/d404af0d987a9c38cafce82a7e26ec8468c88361 and other fixes like this
27    # but since this oe-core change http://git.openembedded.org/openembedded-core/commit/?id=5f8f16b17f66966ae91aeabc23e97de5ecd17447
28    # there isn't python in HOSTTOOLS so "env python" fails
29    sed -i 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@g' ${S}/googlemock/test/*py ${S}/googletest/test/*py
30}
31