aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/dc/double-conversion_3.2.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/dc/double-conversion_3.2.1.bb')
-rw-r--r--meta-oe/recipes-support/dc/double-conversion_3.2.1.bb25
1 files changed, 24 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/dc/double-conversion_3.2.1.bb b/meta-oe/recipes-support/dc/double-conversion_3.2.1.bb
index cc54dc6481..92466f67a3 100644
--- a/meta-oe/recipes-support/dc/double-conversion_3.2.1.bb
+++ b/meta-oe/recipes-support/dc/double-conversion_3.2.1.bb
@@ -10,9 +10,32 @@ S = "${WORKDIR}/git"
SRC_URI = " \
git://github.com/google/double-conversion.git;protocol=https;branch=master \
+ file://run-ptest \
"
SRCREV = "af09fd65fcf24eee95dc62813ba9123414635428"
-inherit cmake
+inherit cmake ptest
EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON"
+
+# These ptest use ctest (provided by cmake)
+RDEPENDS:${PN}-ptest += "cmake"
+# Build tests only if ptest is enabled
+EXTRA_OECMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', '-DBUILD_TESTING=ON', '', d)}"
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/test
+ cp -rf ${B}/test ${D}${PTEST_PATH}
+ install -m 0644 ${B}/CTestTestfile.cmake ${D}${PTEST_PATH}/
+ files="
+ CTestTestfile.cmake
+ test/CTestTestfile.cmake
+ test/cmake_install.cmake
+ test/cctest/CTestTestfile.cmake
+ test/cctest/cmake_install.cmake
+ "
+ for file in $files; do
+ sed -i -e "s|${B}|${PTEST_PATH}|g" -e "s|${S}|${PTEST_PATH}|g" -e "s|${WORKDIR}/recipe-sysroot-native||g" "${D}${PTEST_PATH}/${file}"
+ done
+
+}