From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
To: Koen Kooi <koen.kooi@linaro.org>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] cmake bbclass: fix support for native builds
Date: Tue, 30 Jun 2015 15:28:56 +0200 [thread overview]
Message-ID: <55929998.8020209@herbrechtsmeier.net> (raw)
In-Reply-To: <1435670336-17154-1-git-send-email-koen.kooi@linaro.org>
Am 30.06.2015 um 15:18 schrieb Koen Kooi:
> For native builds of recipes (e.g. mariadb-native) cmake *must* look outside of its sysroot to find the compiler, so instruct it to do so.
>
> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
> ---
> meta/classes/cmake.bbclass | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index b0a3972..29a78e5 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -27,6 +27,9 @@ OECMAKE_RPATH ?= ""
> OECMAKE_PERLNATIVE_DIR ??= ""
> OECMAKE_EXTRA_ROOT_PATH ?= ""
>
> +OECMAKE_PATHS ?= ""
> +OECMAKE_PATHS_class-native = "set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH )"
> +
> cmake_do_generate_toolchain_file() {
> cat > ${WORKDIR}/toolchain.cmake <<EOF
> # CMake system name must be something like "Linux".
> @@ -67,6 +70,8 @@ list(APPEND CMAKE_MODULE_PATH "${STAGING_DATADIR}/cmake/Modules/")
> # add for non /usr/lib libdir, e.g. /usr/lib64
> set( CMAKE_LIBRARY_PATH ${libdir} ${base_libdir})
>
> +${OECMAKE_PATHS}
> +
> EOF
> }
>
This would generate a second set of the
CMAKE_FIND_ROOT_PATH_MODE_PROGRAM with a different value.
Why not add a new variable and use it in the existing set:
+OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY"
+OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
-set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
+set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
${OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM})
next prev parent reply other threads:[~2015-06-30 13:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 13:18 [PATCH] cmake bbclass: fix support for native builds Koen Kooi
2015-06-30 13:28 ` Stefan Herbrechtsmeier [this message]
2015-07-01 6:49 ` Koen Kooi
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=55929998.8020209@herbrechtsmeier.net \
--to=stefan@herbrechtsmeier.net \
--cc=koen.kooi@linaro.org \
--cc=openembedded-core@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox