All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentin Longchamp <valentin.longchamp@epfl.ch>
To: "openembedded-devel@lists.openembedded.org"
	<openembedded-devel@lists.openembedded.org>
Subject: Re: [PATCH] render cmake search path stricter
Date: Wed, 24 Jun 2009 15:07:13 +0200	[thread overview]
Message-ID: <4A422501.9070504@epfl.ch> (raw)
In-Reply-To: <4A41BA29.3000007@tait.co.nz>

Douglas Royds wrote:
> Any particular reason not to include CMAKE_FIND_ROOT_PATH_MODE_PACKAGE?

Simply because I did not know about it as I based myself on the this 
doc: http://www.cmake.org/Wiki/CMake_Cross_Compiling and they never talk 
about this variable. I do not see a lot of references to that variable 
so I don't think we should set it here.

> 
> Normally this won't have any effect, as CMake will look in the CMake 
> installation for FindSomething.cmake ("module" mode). But if a package 
> installs a SomethingConfig.cmake in /usr/share/cmake (the "config" mode 
> of find_package) we should be looking only in staging, not trawling 
> around on the host PC.

I agree with you, we should be looking only in staging. But the problem 
is that with the below proposed option 
DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=ONLY, the OE buids do not work well. 
You certainly need a few tools from the host PC. That's why I now have 
CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH. But the default behaviour with 
cmake is that the directories listed in CMAKE_FIND_ROOT_PATH are 
searched for, which is what we want.

Val

> 
> Douglas.
> 
> 
> Valentin Longchamp wrote:
>> The search is only done in the STAGING directy: all the needed tools
>> should be there (already built) and all the libs and header are there
>> too. With this, we are sure that we do not mix with the host libs,
>> headers or tools.
>>
>> Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
>> ---
>>  classes/cmake.bbclass |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass
>> index b5b7b86..af8f3a9 100644
>> --- a/classes/cmake.bbclass
>> +++ b/classes/cmake.bbclass
>> @@ -21,6 +21,9 @@ cmake_do_configure() {
>>    cmake ${OECMAKE_SOURCEPATH} \
>>      -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
>>      -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_HOST} \
>> +    -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=ONLY \
>> +    -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
>> +    -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
>>      ${EXTRA_OECMAKE} \
>>      -Wno-dev
>>  }
>>   
-- 
Valentin Longchamp, PhD Student, EPFL-STI-LSRO1
valentin.longchamp@epfl.ch, Phone: +41216937827
http://people.epfl.ch/valentin.longchamp
MEA3485, Station 9, CH-1015 Lausanne



  reply	other threads:[~2009-06-24 13:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18 17:05 [PATCH] render cmake search path stricter Valentin Longchamp
2009-06-24  5:31 ` Douglas Royds
2009-06-24 13:07   ` Valentin Longchamp [this message]
2009-06-24 22:05     ` Douglas Royds

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=4A422501.9070504@epfl.ch \
    --to=valentin.longchamp@epfl.ch \
    --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.