diff options
Diffstat (limited to 'meta-oe/recipes-test/googletest')
-rw-r--r-- | meta-oe/recipes-test/googletest/googletest_1.14.0.bb | 37 | ||||
-rw-r--r-- | meta-oe/recipes-test/googletest/googletest_git.bb | 31 |
2 files changed, 37 insertions, 31 deletions
diff --git a/meta-oe/recipes-test/googletest/googletest_1.14.0.bb b/meta-oe/recipes-test/googletest/googletest_1.14.0.bb new file mode 100644 index 0000000000..6546845715 --- /dev/null +++ b/meta-oe/recipes-test/googletest/googletest_1.14.0.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Google's framework for writing C++ tests" +HOMEPAGE = "https://github.com/google/googletest" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a" + +PROVIDES += "gmock gtest" + +S = "${WORKDIR}/git" +SRCREV = "f8d7d77c06936315286eb55f8de22cd23c188571" +SRC_URI = "git://github.com/google/googletest.git;branch=main;protocol=https" + +inherit cmake pkgconfig + +# allow for shared libraries, but do not default to them +# +PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,," + +CXXFLAGS:append = " -fPIC" + +ALLOW_EMPTY:${PN} = "1" +ALLOW_EMPTY:${PN}-dbg = "1" + +# -staticdev will not be implicitly put into an SDK, so we add an rdepend +# if we are not building shared libraries +# +RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG","shared","","${PN}-staticdev",d)}" + +BBCLASSEXTEND = "native nativesdk" + +do_configure:prepend() { + # explicitly use python3 + # the scripts are already python3 compatible since https://github.com/google/googletest/commit/d404af0d987a9c38cafce82a7e26ec8468c88361 and other fixes like this + # but since this oe-core change http://git.openembedded.org/openembedded-core/commit/?id=5f8f16b17f66966ae91aeabc23e97de5ecd17447 + # there isn't python in HOSTTOOLS so "env python" fails + sed -i 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@g' ${S}/googlemock/test/*py ${S}/googletest/test/*py +} diff --git a/meta-oe/recipes-test/googletest/googletest_git.bb b/meta-oe/recipes-test/googletest/googletest_git.bb deleted file mode 100644 index 354e7de337..0000000000 --- a/meta-oe/recipes-test/googletest/googletest_git.bb +++ /dev/null @@ -1,31 +0,0 @@ -DESCRIPTION = "Google's framework for writing C++ tests" -HOMEPAGE = "https://github.com/google/googletest" -SECTION = "libs" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://googlemock/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \ - file://googletest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a" - -PV = "1.10.0" - -PROVIDES += "gmock gtest" - -S = "${WORKDIR}/git" -SRCREV = "703bd9caab50b139428cea1aaff9974ebee5742e" -SRC_URI = "git://github.com/google/googletest.git" - -inherit cmake - -ALLOW_EMPTY_${PN} = "1" -ALLOW_EMPTY_${PN}-dbg = "1" - -RDEPENDS_${PN}-dev += "${PN}-staticdev" - -BBCLASSEXTEND = "native nativesdk" - -do_configure_prepend() { - # explicitly use python3 - # the scripts are already python3 compatible since https://github.com/google/googletest/commit/d404af0d987a9c38cafce82a7e26ec8468c88361 and other fixes like this - # but since this oe-core change http://git.openembedded.org/openembedded-core/commit/?id=5f8f16b17f66966ae91aeabc23e97de5ecd17447 - # there isn't python in HOSTTOOLS so "env python" fails - sed -i 's@^#!/usr/bin/env python$@#!/usr/bin/env python3@g' ${S}/googlemock/scripts/*py ${S}/googlemock/scripts/generator/*py ${S}/googlemock/scripts/generator/cpp/*py ${S}/googlemock/test/*py ${S}/googletest/scripts/*py ${S}/googletest/test/*py -} |