Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 1 | # |
| 2 | # Copyright OpenEmbedded Contributors |
| 3 | # |
| 4 | # SPDX-License-Identifier: MIT |
| 5 | # |
| 6 | |
| 7 | SUMMARY = "A C++ example compiled with cmake." |
| 8 | |
| 9 | require cpp-example.inc |
| 10 | |
| 11 | SRC_URI += "file://CMakeLists.txt" |
| 12 | |
| 13 | inherit cmake-qemu |
| 14 | |
| 15 | PACKAGECONFIG[failing_test] = "-DFAILING_TEST=ON" |
| 16 | |
| 17 | FILES:${PN}-ptest += "${bindir}/test-cmake-example" |
| 18 | |
| 19 | do_run_tests () { |
| 20 | bbnote ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' --target test -- ${EXTRA_OECMAKE_BUILD} |
| 21 | eval ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' --target test -- ${EXTRA_OECMAKE_BUILD} |
| 22 | } |
| 23 | do_run_tests[doc] = "Run cmake --target=test using qemu-user" |
| 24 | |
| 25 | addtask do_run_tests after do_compile |