All of lore.kernel.org
 help / color / mirror / Atom feed
From: akuster808 <akuster808@gmail.com>
To: Koen Kooi <koen.kooi@linaro.org>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v2] cmake bbclass: fix support for native builds
Date: Wed, 01 Jul 2015 08:08:48 -0700	[thread overview]
Message-ID: <55940280.2020806@gmail.com> (raw)
In-Reply-To: <1435733845-5742-1-git-send-email-koen.kooi@linaro.org>



On 06/30/2015 11:57 PM, Koen Kooi wrote:
> 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>

Works for me. Thanks Koen.

Signed-off-by: Armin Kuster <akuster808@gmail.com>

if you need it.


> ---
>   meta/classes/cmake.bbclass | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index b0a3972..c174246 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_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY"
> +OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
> +
>   cmake_do_generate_toolchain_file() {
>   	cat > ${WORKDIR}/toolchain.cmake <<EOF
>   # CMake system name must be something like "Linux".
> @@ -50,7 +53,7 @@ set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
>   # up libraries and tools from the native build machine
>   set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN})
>   set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
> -set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
> +set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM} )
>   set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
>   set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
>
>


      reply	other threads:[~2015-07-01 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01  6:57 [PATCH v2] cmake bbclass: fix support for native builds Koen Kooi
2015-07-01 15:08 ` akuster808 [this message]

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=55940280.2020806@gmail.com \
    --to=akuster808@gmail.com \
    --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 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.