summaryrefslogtreecommitdiffstats
path: root/meta-selftest/recipes-test/cpp/cmake-example.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-selftest/recipes-test/cpp/cmake-example.bb')
-rw-r--r--meta-selftest/recipes-test/cpp/cmake-example.bb25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/cpp/cmake-example.bb b/meta-selftest/recipes-test/cpp/cmake-example.bb
new file mode 100644
index 0000000000..aecfcf780a
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/cmake-example.bb
@@ -0,0 +1,25 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7SUMMARY = "A C++ example compiled with cmake."
8
9require cpp-example.inc
10
11SRC_URI += "file://CMakeLists.txt"
12
13inherit cmake-qemu
14
15PACKAGECONFIG[failing_test] = "-DFAILING_TEST=ON"
16
17FILES:${PN}-ptest += "${bindir}/test-cmake-example"
18
19do_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}
23do_run_tests[doc] = "Run cmake --target=test using qemu-user"
24
25addtask do_run_tests after do_compile