summaryrefslogtreecommitdiffstats
path: root/meta-selftest/recipes-test/cpp/cmake-example.bb
blob: aecfcf780a355fca96566dc556be745523d2497d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#
# Copyright OpenEmbedded Contributors
#
# SPDX-License-Identifier: MIT
#

SUMMARY = "A C++ example compiled with cmake."

require cpp-example.inc

SRC_URI += "file://CMakeLists.txt"

inherit cmake-qemu

PACKAGECONFIG[failing_test] = "-DFAILING_TEST=ON"

FILES:${PN}-ptest += "${bindir}/test-cmake-example"

do_run_tests () {
    bbnote ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' --target test -- ${EXTRA_OECMAKE_BUILD}
    eval ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' --target test -- ${EXTRA_OECMAKE_BUILD}
}
do_run_tests[doc] = "Run cmake --target=test using qemu-user"

addtask do_run_tests after do_compile