summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/magic-enum
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/magic-enum')
-rw-r--r--meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest27
-rw-r--r--meta-oe/recipes-extended/magic-enum/magic-enum_0.9.7.bb43
2 files changed, 70 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
new file mode 100644
index 0000000000..865da9f69e
--- /dev/null
+++ b/meta-oe/recipes-extended/magic-enum/magic-enum/run-ptest
@@ -0,0 +1,27 @@
1#!/bin/sh
2
3# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH
4#
5# SPDX-License-Identifier: MIT
6
7fail_count=0
8all_count=0
9
10for test_suite in tests/test_*
11do
12 if "./$test_suite"
13 then
14 echo "PASS: $test_suite"
15 else
16 echo "FAIL: $test_suite"
17 fail_count=$((fail_count + 1))
18 fi
19 all_count=$((all_count + 1))
20done
21
22if [ $fail_count -eq 0 ]
23then
24 echo "PASS: All $all_count tests passed"
25else
26 echo "FAIL: $fail_count of $all_count tests failed"
27fi
diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.7.bb b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.7.bb
new file mode 100644
index 0000000000..6d5399c8d0
--- /dev/null
+++ b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.7.bb
@@ -0,0 +1,43 @@
1# SPDX-FileCopyrightText: 2024 Bosch Sicherheitssysteme GmbH
2#
3# SPDX-License-Identifier: MIT
4
5SUMMARY = "Static reflection for enums"
6DESCRIPTION = "Header-only C++17 library provides static reflection for enums, works \
7with any enum type without any macro or boilerplate code."
8BUGTRACKER = "https://github.com/Neargye/magic_enum/issues"
9HOMEPAGE = "https://github.com/Neargye/magic_enum"
10
11LICENSE = "MIT"
12LIC_FILES_CHKSUM = "file://LICENSE;md5=7e7717cf723eb72f57e80fdb651cb318"
13
14SRC_URI = " \
15 git://github.com/Neargye/magic_enum.git;protocol=https;branch=master \
16 file://run-ptest \
17"
18
19SRCREV = "e046b69a3736d314fad813e159b1c192eaef92cd"
20
21inherit cmake ptest
22
23EXTRA_OECMAKE = "\
24 -DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF \
25"
26
27do_install_ptest () {
28 install -d ${D}${PTEST_PATH}/tests
29 install -m 0755 ${B}/test/test_* ${D}${PTEST_PATH}/tests
30}
31
32# Add catkin and colcon (ROS build system) support
33FILES:${PN}-dev += "\
34 ${datadir}/magic_enum/package.xml \
35"
36
37# Header-only library
38# ${PN} is empty so we need to tweak -dev and -dbg package dependencies
39RDEPENDS:${PN}-dev = ""
40RDEPENDS:${PN}-ptest = ""
41RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
42
43BBCLASSEXTEND = "native nativesdk"