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