From: Robert Schuster <thebohemian@gmx.net>
To: openembedded-devel@lists.openembedded.org
Subject: RFC: CMAKE - support out of tree builds
Date: Thu, 12 Mar 2009 16:49:52 +0100 [thread overview]
Message-ID: <49B92F20.3060701@gmx.net> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 340 bytes --]
Hi,
I am proposing the attached patch to make it possible to do out-of-tree
builds in OE. Out-of-tree builds should be preferred but I do not want
to look at every recipe if it still works.
OTOH I want to include llvm 2.5 with its new cmake-based build system
which incidentally does *not* permit in-tree builds.
Regards
Robert
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: oe-cmake-outoftree.patch --]
[-- Type: text/x-patch; name="oe-cmake-outoftree.patch", Size: 1106 bytes --]
diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass
index 8fd25cd..7907f94 100644
--- a/classes/cmake.bbclass
+++ b/classes/cmake.bbclass
@@ -3,13 +3,25 @@ DEPENDS += " cmake-native "
# We want the staging and installing functions from autotools
inherit autotools
+# Use in-tree builds by default but allow this to be changed
+# since some packages do not support them (e.g. llvm 2.5).
OECMAKE_SOURCEPATH ?= "."
+# If declaring this, make sure you also set EXTRA_OEMAKE to
+# "-C ${OECMAKE_BUILDPATH}". So it will run the right makefiles.
+OECMAKE_BUILDPATH ?= ""
+
cmake_do_configure() {
- cmake ${OECMAKE_SOURCEPATH} \
- -DCMAKE_INSTALL_PREFIX:PATH=${prefix} -Wno-dev \
- -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_HOST} \
- ${EXTRA_OECMAKE}
+ if [ ${OECMAKE_BUILDPATH} ]
+ then
+ mkdir ${OECMAKE_BUILDPATH}
+ cd ${OECMAKE_BUILDPATH}
+ fi
+
+ cmake ${OECMAKE_SOURCEPATH} \
+ -DCMAKE_INSTALL_PREFIX:PATH=${prefix} -Wno-dev \
+ -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_HOST} \
+ ${EXTRA_OECMAKE}
}
EXPORT_FUNCTIONS do_configure
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 268 bytes --]
next reply other threads:[~2009-03-12 15:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 15:49 Robert Schuster [this message]
2009-03-19 19:47 ` RFC: CMAKE - support out of tree builds Robert Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49B92F20.3060701@gmx.net \
--to=thebohemian@gmx.net \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.