Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
To: Jonathan Liu <net147@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v2] cmake.bbclass: allow searching host paths for non-target builds
Date: Wed, 17 Jul 2013 09:46:07 +0200	[thread overview]
Message-ID: <51E64BBF.5030900@herbrechtsmeier.net> (raw)
In-Reply-To: <1374042411-1193-1-git-send-email-net147@gmail.com>

Am 17.07.2013 08:26, schrieb Jonathan Liu:
> This allows /usr/bin/{ld,ar,objcopy,objdump,ranlib,strip} to be found
> and the CMAKE_{LINKER,AR,OBJCOPY,OBJDUMP,RANLIB,STRIP} cmake variables
> to be properly set for native cmake recipes.
>
> Signed-off-by: Jonathan Liu <net147@gmail.com>
> ---
>   meta/classes/cmake.bbclass | 15 ++++++++++-----
>   1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index 310242e..2040147 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -46,12 +46,7 @@ set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLA
>   set( CMAKE_C_LINK_FLAGS "${OECMAKE_C_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
>   set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
>   
> -# only search in the paths provided so cmake doesnt pick
> -# 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_PROGRAM ONLY )
> -set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
> -set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
This changes the whole find behaviour and allows cmake to find *all* 
software from the native build machine.  You should add 
NO_CMAKE_FIND_ROOT_PATH to the find_xxx calls or you could manual set 
the variables and bypass the find calls.



      reply	other threads:[~2013-07-17  7:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17  6:26 [PATCH v2] cmake.bbclass: allow searching host paths for non-target builds Jonathan Liu
2013-07-17  7:46 ` Stefan Herbrechtsmeier [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=51E64BBF.5030900@herbrechtsmeier.net \
    --to=stefan@herbrechtsmeier.net \
    --cc=net147@gmail.com \
    --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