From: Adam Trhon <adam.trhon@tbs-biometrics.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: Openembedded Core <openembedded-core@lists.openembedded.org>
Subject: Re: how to load cmake args from git?
Date: Fri, 23 Jun 2017 12:57:05 +0200 [thread overview]
Message-ID: <20170623125705.08cf0025@loki02> (raw)
In-Reply-To: <CAJTo0LbmHft+JXd7ce7r3JCza4G182D4Hnt78hU89DO+TYCNDQ@mail.gmail.com>
On Thu, 22 Jun 2017 22:51:26 +0100
"Burton, Ross" <ross.burton@intel.com> wrote:
> On 22 June 2017 at 09:42, Adam Trhon <adam.trhon@tbs-biometrics.com> wrote:
>
> > but I am not very happy about using PACKAGECONFIG_CONFARGS - it feels
> > hacky, the
> > arguments are not shown in cmake fail log and it cannot handle argumetns
> > containing
> > spaces. Is there a cleaner way to achieve this?
> >
>
> Definitely don't use PACKAGECONFIG_CONFARGS: that has a well defined
> meaning and use, and that isn't it.
>
> I don't see why as you control the repository why can't you just set the
> arguments in cmakelists, or the recipe itself? Either they're useful
> everywhere (cmakelists) or in OE builds (recipe).
The CMake options are maintained and used by upstream project developers
(I am one of them). Sometimes they change the options between
revisions, so it is difficult to maintain the argument list in the
recipe.
I also want to let the upstream project developers change some arguments
without touching the recipe (for automated builds).
>
> Anyway, you could do something like this:
>
> python() {
> d.appendVar("EXTRA_OECMAKE", " " +
> open(d.expand("${S}/oe_arguments.txt")).read()
> }
According to documentation, this is expanded during recipe parsing. At
that time ${S}/oe_arguments.txt does not yet exits (it exists only after
do_unpack). I tried it and the build failed with python Exception:
FileNotFound.
I tried
python do_setup_extra_oecmake() {
d.appendVar("EXTRA_OECMAKE", " " + open(d.expand("${S}/oe_arguments.txt")).read())
print("adding "+d.expand("${S}/oe_arguments.txt"))
}
addtask do_setup_extra_oecmake after do_unpack before do_configure
but it did not work as well. The "adding.... " line is printed
correctly in log.do_setup_extra_oecmake, the file exists, but the
arguments in it are not used (I checked run.do_configure).
Thank you
Adam
>
> Ross
--
Ing. Adam Trhoň, Software Engineer
Touchless Biometric Systems s.r.o. |
Palackého třída 180/44 | 61200 Brno | CZECH REPUBLIC |
Mobile: +42(0) 721 565 113 | tbs-biometrics.cz
next prev parent reply other threads:[~2017-06-23 12:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 8:42 how to load cmake args from git? Adam Trhon
2017-06-22 21:51 ` Burton, Ross
2017-06-23 10:57 ` Adam Trhon [this message]
2017-06-23 12:53 ` Burton, Ross
2017-06-23 13:21 ` Adam Trhon
2017-07-05 13:59 ` Adam Trhon
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=20170623125705.08cf0025@loki02 \
--to=adam.trhon@tbs-biometrics.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@intel.com \
/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