Is there a way to pass args to cmake build from the package.py? #1343
Answered
by
nerdvegas
anderslanglands
asked this question in
Q&A
Replies: 3 comments
-
You can just use `build_command` instead? It only has limited ability to
reference package attributes, but if you need more, you can make it an
early bound func (
https://github.com/AcademySoftwareFoundation/rez/wiki/Package-Definition-Guide#early-binding-functions
).
https://github.com/AcademySoftwareFoundation/rez/wiki/Package-Definition-Guide#build_command
Hth
A
…On Wed, Jun 29, 2022 at 7:43 PM Anders Langlands ***@***.***> wrote:
I've found child_build_args but that doesn't go to cmake (does it go to
make, ninja etc?). I've hacked something in with:
build_args += getattr(package, "build_system_args", [])
in create_build_system() but I'm wondering if there's a proper way of
doing it?
—
Reply to this email directly, view it on GitHub
<#1343>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMOUSTOOUA3SZBQYSUCXB3VRQLEVANCNFSM52FCRTPQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JeanChristopheMorinPerso
-
Thanks that makes sense. And if I make it a function, does that function
return a string to be executed by the shell or actually run the build using
eg subpocess.run()?
…On Wed, 29 Jun 2022 at 22:47, allan johns ***@***.***> wrote:
You can just use `build_command` instead? It only has limited ability to
reference package attributes, but if you need more, you can make it an
early bound func (
https://github.com/AcademySoftwareFoundation/rez/wiki/Package-Definition-Guide#early-binding-functions
).
https://github.com/AcademySoftwareFoundation/rez/wiki/Package-Definition-Guide#build_command
Hth
A
On Wed, Jun 29, 2022 at 7:43 PM Anders Langlands ***@***.***>
wrote:
> I've found child_build_args but that doesn't go to cmake (does it go to
> make, ninja etc?). I've hacked something in with:
>
> build_args += getattr(package, "build_system_args", [])
>
> in create_build_system() but I'm wondering if there's a proper way of
> doing it?
>
> —
> Reply to this email directly, view it on GitHub
> <#1343>, or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAMOUSTOOUA3SZBQYSUCXB3VRQLEVANCNFSM52FCRTPQ
>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#1343 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOYQXMCLLXY5JM4CGPRTTLVRQSVJANCNFSM52FCRTPQ>
.
You are receiving this because you authored the thread.Message ID:
<AcademySoftwareFoundation/rez/repo-discussions/1343/comments/3047474@
github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
The former. Most package attributes can be implemented as 'early'
functions, and they're expected to return the value that the standard
attribute would normally be (eg a list for 'requires', a string for
'name'). They literally get evaluated like that and the return value is
baked into the installed package.py.
On Wed, 29 June 2022, 20:55 Anders Langlands, ***@***.***>
wrote:
… Thanks that makes sense. And if I make it a function, does that function
return a string to be executed by the shell or actually run the build using
eg subpocess.run()?
On Wed, 29 Jun 2022 at 22:47, allan johns ***@***.***> wrote:
> You can just use `build_command` instead? It only has limited ability to
> reference package attributes, but if you need more, you can make it an
> early bound func (
>
>
https://github.com/AcademySoftwareFoundation/rez/wiki/Package-Definition-Guide#early-binding-functions
> ).
>
>
>
https://github.com/AcademySoftwareFoundation/rez/wiki/Package-Definition-Guide#build_command
>
> Hth
> A
>
>
> On Wed, Jun 29, 2022 at 7:43 PM Anders Langlands ***@***.***>
> wrote:
>
> > I've found child_build_args but that doesn't go to cmake (does it go to
> > make, ninja etc?). I've hacked something in with:
> >
> > build_args += getattr(package, "build_system_args", [])
> >
> > in create_build_system() but I'm wondering if there's a proper way of
> > doing it?
> >
> > —
> > Reply to this email directly, view it on GitHub
> > <#1343>,
or
> > unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/AAMOUSTOOUA3SZBQYSUCXB3VRQLEVANCNFSM52FCRTPQ
> >
> > .
> > You are receiving this because you are subscribed to this
thread.Message
> > ID: ***@***.***>
> >
>
> —
> Reply to this email directly, view it on GitHub
> <
#1343 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAOYQXMCLLXY5JM4CGPRTTLVRQSVJANCNFSM52FCRTPQ
>
> .
> You are receiving this because you authored the thread.Message ID:
> <AcademySoftwareFoundation/rez/repo-discussions/1343/comments/3047474@
> github.com>
>
—
Reply to this email directly, view it on GitHub
<#1343 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMOUSX225THTMCAAHNDKUDVRQTQVANCNFSM52FCRTPQ>
.
You are receiving this because you commented.Message ID:
<AcademySoftwareFoundation/rez/repo-discussions/1343/comments/3047544@
github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've found
child_build_args
but that doesn't go to cmake (does it go to make, ninja etc?). I've hacked something in with:in
create_build_system()
but I'm wondering if there's a proper way of doing it?Beta Was this translation helpful? Give feedback.
All reactions