[OE-core] [RFC][PATCH][V2] cmake: respect ${S} and ${B}

Ross Burton ross.burton at intel.com
Fri Jan 10 17:54:45 UTC 2014


Hi,

Here is V2 of my cmake ${S}/${B} patch.  The class isn't that changed since V1,
apart from the addition of a note if the recipe has set OECMAKE_SOURCEPATH or
_BUILDPATH.

Then there's the choice of what we do with the default for ${B}.  One patch sets
${B} in separatebuilddir.inc for libproxy and taglib in oe-core.  The
alternative is to set B in cmake.bbclass directly to ${WORKDIR}/build.

Either way, this change to the class isn't backwards-compatible with many
recipes in the wild due to various ways of doing out-of-tree builds in meta-oe.
A branch that fixes up meta-oe (by generally deleting lines) is available in
meta-oe-contrib:ross/cmake for reference.  Some recipes are using
OECMAKE_SOURCEPATH/_BUILDPATH, and others are doing out-of-tree builds
"manually" by passing arguments to EXTRA_OECMAKE and doing cd's in
do_compile_prepend. Yuck.

Personally, I'd say we should merge cmake.bbclass with B set inside it by
default.  In my testing against meta-oe, only piglit is troublesome and that can
set B=${S}, everything else seems to be working fine once the recipes were cleaned up.

Ross




More information about the Openembedded-core mailing list