mirror of
https://git.yoctoproject.org/poky
synced 2026-04-03 02:02:21 +02:00
cmake.bbclass: Make it work with ccache
This can make the following recipes work with cmake: cmake libdnf libcomps librepo createrepo-c llvm dnf libsolv assimp waffle libjpeg-turbo taglib libproxy libical And the following 3 recipes don't: webkitgtk vulkan piglit Now cmake.bbclass doesn't disble ccache any more, disable it in the recipes if needed. (From OE-Core rev: d014c8c11fb663f131d3a860ddeda17d604b2dd3) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
7a713b0fbf
commit
3be36b0d27
@@ -4,9 +4,6 @@ OECMAKE_SOURCEPATH ??= "${S}"
|
||||
DEPENDS_prepend = "cmake-native "
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
# We need to unset CCACHE otherwise cmake gets too confused
|
||||
CCACHE = ""
|
||||
|
||||
# What CMake generator to use.
|
||||
# The supported options are "Unix Makefiles" or "Ninja".
|
||||
OECMAKE_GENERATOR ?= "Ninja"
|
||||
@@ -23,10 +20,22 @@ python() {
|
||||
d.setVarFlag("do_compile", "progress", r"outof:^\[(\d+)/(\d+)\]\s+")
|
||||
else:
|
||||
bb.fatal("Unknown CMake Generator %s" % generator)
|
||||
|
||||
# C/C++ Compiler (without cpu arch/tune arguments)
|
||||
if not d.getVar('OECMAKE_C_COMPILER'):
|
||||
cc_list = d.getVar('CC').split()
|
||||
if cc_list[0] == 'ccache':
|
||||
d.setVar('OECMAKE_C_COMPILER', '%s %s' % (cc_list[0], cc_list[1]))
|
||||
else:
|
||||
d.setVar('OECMAKE_C_COMPILER', cc_list[0])
|
||||
|
||||
if not d.getVar('OECMAKE_CXX_COMPILER'):
|
||||
cxx_list = d.getVar('CXX').split()
|
||||
if cxx_list[0] == 'ccache':
|
||||
d.setVar('OECMAKE_CXX_COMPILER', '%s %s' % (cxx_list[0], cxx_list[1]))
|
||||
else:
|
||||
d.setVar('OECMAKE_CXX_COMPILER', cxx_list[0])
|
||||
}
|
||||
# C/C++ Compiler (without cpu arch/tune arguments)
|
||||
OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
|
||||
OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
|
||||
OECMAKE_AR ?= "${AR}"
|
||||
|
||||
# Compiler flags
|
||||
|
||||
@@ -52,3 +52,6 @@ RDEPENDS_${PN} = "waffle waffle-bin python3 python3-mako python3-json \
|
||||
"
|
||||
|
||||
INSANE_SKIP_${PN} += "dev-so already-stripped"
|
||||
|
||||
# Can't be built with ccache
|
||||
CCACHE_DISABLE = "1"
|
||||
|
||||
@@ -35,3 +35,6 @@ PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SU
|
||||
|
||||
RRECOMMENDS_${PN} = "mesa-vulkan-drivers"
|
||||
INSANE_SKIP_${PN}-dev += "dev-elf"
|
||||
|
||||
# Can't be built with ccache
|
||||
CCACHE_DISABLE = "1"
|
||||
|
||||
@@ -121,3 +121,6 @@ ARM_INSTRUCTION_SET_armv7ve = "thumb"
|
||||
# Segmentation fault
|
||||
GI_DATA_ENABLED_armv7a = "False"
|
||||
GI_DATA_ENABLED_armv7ve = "False"
|
||||
|
||||
# Can't be built with ccache
|
||||
CCACHE_DISABLE = "1"
|
||||
|
||||
Reference in New Issue
Block a user