mirror of
https://git.yoctoproject.org/poky
synced 2026-02-23 18:09:40 +01:00
ctest automatically optimizes the order of (parallel) test execution based on historic test case runtime via the COST property (see [0]), which can have a significant impact on overall test run times. Sadly this feature is broken in CMake < 4.0.0 for test cases that have spaces in their name (see [1]). This commit is a backport of f24178f3 (which itself backports the upstream fix). the patch was adapted slightly to apply cleanly to the older CMake version in kirkstone. As repeated test runs are expected to mainly take place inside the SDK, the patch is only applied to 'nativesdk' builds. [0]: https://cmake.org/cmake/help/latest/prop_test/COST.html [1]: https://gitlab.kitware.com/cmake/cmake/-/issues/26594 Reported-By: John Drouhard <john@drouhard.dev> (From OE-Core rev: f6a160f7ea57af6dfeca003e6c05aa42419fb755) Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
66 lines
2.3 KiB
BlitzBasic
66 lines
2.3 KiB
BlitzBasic
require cmake.inc
|
|
inherit native
|
|
|
|
DEPENDS += "bzip2-replacement-native xz-native zlib-native curl-native ncurses-native zstd-native"
|
|
|
|
SRC_URI += "file://OEToolchainConfig.cmake \
|
|
file://environment.d-cmake.sh \
|
|
file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
|
|
file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \
|
|
"
|
|
|
|
LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause"
|
|
LIC_FILES_CHKSUM:append = " \
|
|
file://Utilities/cmjsoncpp/LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b \
|
|
file://Utilities/cmlibarchive/COPYING;md5=d499814247adaee08d88080841cb5665 \
|
|
file://Utilities/cmexpat/COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9 \
|
|
file://Utilities/cmlibrhash/COPYING;md5=a8c2a557a5c53b1c12cddbee98c099af \
|
|
file://Utilities/cmlibuv/LICENSE;md5=a68902a430e32200263d182d44924d47 \
|
|
"
|
|
|
|
B = "${WORKDIR}/build"
|
|
do_configure[cleandirs] = "${B}"
|
|
|
|
CMAKE_EXTRACONF = "\
|
|
-DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \
|
|
-DBUILD_CursesDialog=1 \
|
|
-DCMAKE_USE_SYSTEM_LIBRARIES=1 \
|
|
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
|
|
-DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
|
|
-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
|
|
-DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
|
|
-DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \
|
|
-DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
|
|
-DHAVE_SYS_ACL_H=0 \
|
|
-DCURL_LIBRARIES=-lcurl \
|
|
"
|
|
|
|
do_configure () {
|
|
${S}/configure --verbose --prefix=${prefix} \
|
|
${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \
|
|
${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \
|
|
-- ${CMAKE_EXTRACONF}
|
|
}
|
|
|
|
do_compile() {
|
|
oe_runmake
|
|
}
|
|
|
|
do_install() {
|
|
oe_runmake 'DESTDIR=${D}' install
|
|
|
|
# The following codes are here because eSDK needs to provide compatibility
|
|
# for SDK. That is, eSDK could also be used like traditional SDK.
|
|
mkdir -p ${D}${datadir}/cmake
|
|
install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
|
|
mkdir -p ${D}${base_prefix}/environment-setup.d
|
|
install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh
|
|
|
|
# Help docs create tons of files in the native sysroot and aren't needed there
|
|
rm -rf ${D}${datadir}/cmake-*/Help
|
|
}
|
|
|
|
do_compile[progress] = "percent"
|
|
|
|
SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d"
|