Openembedded Core Discussions
 help / color / mirror / Atom feed
* [RFC][PATCH] cmake: respect ${S} and ${B}
@ 2013-12-05  0:38 Ross Burton
  2013-12-05  0:38 ` [PATCH] " Ross Burton
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Ross Burton @ 2013-12-05  0:38 UTC (permalink / raw)
  To: openembedded-core; +Cc: openembedded-devel

Hi,

This is a Request For Comments because it changes behaviour of the cmake class
and I'm not entirely knowledgeable in cmake.

For some reason, cmake.bbclass doesn't use ${S} and ${B}, but instead has it's
own variables OECMAKE_SOURCEPATH ("." by default) and OECMAKE_BUILDPATH ("" by
default).  Those defaults meant that the build happened in the source directory,
which conveniently was ${S}.  Unless ${B} was also set, in which case it all
broke.

I don't see a good reason for cmake.bbclass having it's own special versions of
${S} and ${B}, so this patch drops them and replicates some of the logic in
autotools.bbclass: specifically the part where if ${S} and ${B} are different,
delete ${B} before building.  This ensures that switching machine doesn't re-use
the same build directory, which was the cause of me going back to look at this
(libproxy trying to use the nuc sysroot when I'm building for qemux86-64).

Some open questions:

1) As I understand it cmake has more reliable support for out-of-tree builds
than autotools.  If this is the case should cmake.bbclass set B ?=
"${WORKDIR}/build", or leave setting of B to separatebuilddir.inc?  Are there
known recipes using cmake that fail with out-of-tree builds?

2) Is dropping OECMAKE_SOURCEPATH and OECMAKE_BUILDPATH acceptable?  Nothing in
oe-core uses them and there's three (IIRC) recipes in meta-oe that use them.
Assuming the answer to (1) is "separatebuilddir.inc" then the only fallout
should be these recipes using in-tree builds until OECMAKE_BUILDPATH is replaced
with B.

Feedback and testing from people who actively use cmake very welcome.

Cheers,
Ross


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-12-05 22:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-05  0:38 [RFC][PATCH] cmake: respect ${S} and ${B} Ross Burton
2013-12-05  0:38 ` [PATCH] " Ross Burton
2013-12-05 22:18   ` Philip Balister
2013-12-05 22:23     ` Richard Purdie
2013-12-05  0:55 ` [RFC][PATCH] " Martin Jansa
2013-12-05  9:43 ` Koen Kooi
2013-12-05 10:10 ` Richard Purdie
2013-12-05 11:34   ` Martin Jansa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox