* Re: [PATCH libdrm] meson: do not use cairo/valgrind if disabled
[not found] <20180218130050.17679-1-ignatenko@redhat.com>
@ 2018-02-19 12:15 ` Eric Engestrom
2018-02-19 12:50 ` Igor Gnatenko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Eric Engestrom @ 2018-02-19 12:15 UTC (permalink / raw)
To: Igor Gnatenko; +Cc: dri-devel
On Sunday, 2018-02-18 14:00:50 +0100, Igor Gnatenko wrote:
> -Dcairo-tests=false currently results into enabling cairo support if it
> was found. Same for valgrind.
Indeed, this was wrong; thanks for the fix!
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Do you have commit access, or do you want me to push this for you?
>
> Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
> ---
> meson.build | 20 ++++++++++++++++----
> 1 file changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 166559e8..695f89b3 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -226,8 +226,20 @@ endforeach
>
> dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
> dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
> -dep_cairo = dependency('cairo', required : with_cairo_tests == 'true')
> -dep_valgrind = dependency('valgrind', required : with_valgrind == 'true')
> +if with_cairo_tests != 'false'
> + dep_cairo = dependency('cairo', required : with_cairo_tests == 'true')
> + with_cairo_tests = dep_cairo.found()
> +else
> + dep_cairo = declare_dependency()
Nit: `dep_cairo = []` is enough; I'll change that if I'm the one to push it.
> + with_cairo_tests = false
We try to avoid changing the type of a var; could you send a follow-up
patch to rename the get_option() var to `_cairo_tests`?
(same obviously applies for the valgrind bits)
> +endif
> +if with_valgrind != 'false'
> + dep_valgrind = dependency('valgrind', required : with_valgrind == 'true')
> + with_valgrind = dep_valgrind.found()
> +else
> + dep_valgrind = declare_dependency()
> + with_valgrind = false
> +endif
>
> with_man_pages = get_option('man-pages')
> prog_xslt = find_program('xsltproc', required : with_man_pages == 'true')
> @@ -259,8 +271,8 @@ foreach t : [
> [with_radeon, 'RADEON'],
> [with_vc4, 'VC4'],
> [with_vmwgfx, 'VMWGFX'],
> - [dep_cairo.found(), 'CAIRO'],
> - [dep_valgrind.found(), 'VALGRIND'],
> + [with_cairo_tests, 'CAIRO'],
> + [with_valgrind, 'VALGRIND'],
> ]
> config.set10('HAVE_@0@'.format(t[1]), t[0])
> endforeach
> --
> 2.16.2
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH libdrm] meson: do not use cairo/valgrind if disabled
2018-02-19 12:15 ` [PATCH libdrm] meson: do not use cairo/valgrind if disabled Eric Engestrom
@ 2018-02-19 12:50 ` Igor Gnatenko
2018-02-19 12:51 ` Igor Gnatenko
2018-02-19 12:55 ` Igor Gnatenko
2 siblings, 0 replies; 4+ messages in thread
From: Igor Gnatenko @ 2018-02-19 12:50 UTC (permalink / raw)
To: dri-devel; +Cc: Igor Gnatenko
-Dcairo-tests=false currently results into enabling cairo support if it
was found. Same for valgrind.
v2:
* Use underscore-prefixed variables to not change type of variable
* Use empty array for "fake" dependency instead of real empty object
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
---
meson.build | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/meson.build b/meson.build
index 166559e8..e4e21bae 100644
--- a/meson.build
+++ b/meson.build
@@ -32,8 +32,6 @@ pkg = import('pkgconfig')
with_udev = get_option('udev')
with_freedreno_kgsl = get_option('freedreno-kgsl')
with_install_tests = get_option('install-test-programs')
-with_cairo_tests = get_option('cairo-tests')
-with_valgrind = get_option('valgrind')
config = configuration_data()
@@ -226,8 +224,22 @@ endforeach
dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
-dep_cairo = dependency('cairo', required : with_cairo_tests == 'true')
-dep_valgrind = dependency('valgrind', required : with_valgrind == 'true')
+_cairo_tests = get_option('cairo-tests')
+if _cairo_tests != 'false'
+ dep_cairo = dependency('cairo', required : _cairo_tests == 'true')
+ with_cairo_tests = dep_cairo.found()
+else
+ dep_cairo = []
+ with_cairo_tests = false
+endif
+_valgrind = get_option('valgrind')
+if _valgrind != 'false'
+ dep_valgrind = dependency('valgrind', required : with_valgrind == 'true')
+ with_valgrind = dep_valgrind.found()
+else
+ dep_valgrind = []
+ with_valgrind = false
+endif
with_man_pages = get_option('man-pages')
prog_xslt = find_program('xsltproc', required : with_man_pages == 'true')
@@ -259,8 +271,8 @@ foreach t : [
[with_radeon, 'RADEON'],
[with_vc4, 'VC4'],
[with_vmwgfx, 'VMWGFX'],
- [dep_cairo.found(), 'CAIRO'],
- [dep_valgrind.found(), 'VALGRIND'],
+ [with_cairo_tests, 'CAIRO'],
+ [with_valgrind, 'VALGRIND'],
]
config.set10('HAVE_@0@'.format(t[1]), t[0])
endforeach
--
2.16.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH libdrm] meson: do not use cairo/valgrind if disabled
2018-02-19 12:15 ` [PATCH libdrm] meson: do not use cairo/valgrind if disabled Eric Engestrom
2018-02-19 12:50 ` Igor Gnatenko
@ 2018-02-19 12:51 ` Igor Gnatenko
2018-02-19 12:55 ` Igor Gnatenko
2 siblings, 0 replies; 4+ messages in thread
From: Igor Gnatenko @ 2018-02-19 12:51 UTC (permalink / raw)
To: Eric Engestrom; +Cc: dri-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On Mon, 2018-02-19 at 12:15 +0000, Eric Engestrom wrote:
> On Sunday, 2018-02-18 14:00:50 +0100, Igor Gnatenko wrote:
> > -Dcairo-tests=false currently results into enabling cairo support if it
> > was found. Same for valgrind.
>
> Indeed, this was wrong; thanks for the fix!
> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
>
> Do you have commit access, or do you want me to push this for you?
I don't have commit access ☹
v2 sent with all your comments.
> >
> > Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
> > ---
> > meson.build | 20 ++++++++++++++++----
> > 1 file changed, 16 insertions(+), 4 deletions(-)
> >
> > diff --git a/meson.build b/meson.build
> > index 166559e8..695f89b3 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -226,8 +226,20 @@ endforeach
> >
> > dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required :
> > with_intel)
> > dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
> > -dep_cairo = dependency('cairo', required : with_cairo_tests == 'true')
> > -dep_valgrind = dependency('valgrind', required : with_valgrind == 'true')
> > +if with_cairo_tests != 'false'
> > + dep_cairo = dependency('cairo', required : with_cairo_tests == 'true')
> > + with_cairo_tests = dep_cairo.found()
> > +else
> > + dep_cairo = declare_dependency()
>
> Nit: `dep_cairo = []` is enough; I'll change that if I'm the one to push it.
>
> > + with_cairo_tests = false
>
> We try to avoid changing the type of a var; could you send a follow-up
> patch to rename the get_option() var to `_cairo_tests`?
>
> (same obviously applies for the valgrind bits)
>
> > +endif
> > +if with_valgrind != 'false'
> > + dep_valgrind = dependency('valgrind', required : with_valgrind ==
> > 'true')
> > + with_valgrind = dep_valgrind.found()
> > +else
> > + dep_valgrind = declare_dependency()
> > + with_valgrind = false
> > +endif
> >
> > with_man_pages = get_option('man-pages')
> > prog_xslt = find_program('xsltproc', required : with_man_pages == 'true')
> > @@ -259,8 +271,8 @@ foreach t : [
> > [with_radeon, 'RADEON'],
> > [with_vc4, 'VC4'],
> > [with_vmwgfx, 'VMWGFX'],
> > - [dep_cairo.found(), 'CAIRO'],
> > - [dep_valgrind.found(), 'VALGRIND'],
> > + [with_cairo_tests, 'CAIRO'],
> > + [with_valgrind, 'VALGRIND'],
> > ]
> > config.set10('HAVE_@0@'.format(t[1]), t[0])
> > endforeach
> > --
> > 2.16.2
> >
- --
- -Igor Gnatenko
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEhLFO09aHZVqO+CM6aVcUvRu8X0wFAlqKyFAACgkQaVcUvRu8
X0zP3xAAsa1mi9r8Oi+pdJrXy02Bm2mGSzp8IcrDGF3i0v9d9uP7o484fmYxxz0t
RDu/4YpertGmR+aYiZiEeREnZ7n+GtaBb35O1leU/zz/TniEi+Qne6kQbUcUNE3z
3URS2VKmHPAivR5ctL5/DvwOaAP7sIojlDjsu3ydZafoPVw+FF/cnJaK6yItVH7T
7ZE48i434qBUJT6IsxUCy2jb7gQSCzs/G/gNxYjVxLO/h/rb52eIiPQ5XFd6Aqmt
R5ptwgb4wpQERTEkvSmFTe+tsIwmSyD8o6jJRAK4U0mGV8g5+AB/7fmZmFA7nxQ4
J9Ycqd2JZ96XruBE9qSvu9gK50oVKcQyJaq2heTKkRSwq+HP82qfhtaHsC5hsrTG
lg2+bzpyGStxXzt1bndYQ2u9hcPcbvDxb9mDP5wimacdmD/qmAg2LAv5OiZESgvd
Zm8TWygb/bjJoLZOTdbGqdjFGmOCq3g9ZTqbjWfhv1mmc2ZENoo/fcyyCjUg4MD3
P4IP3ogAUk9H1MORhN6I5rw2ERDGaXy60z4dJwhAfHWmwsoKRbdpRmu9Y2vFQ2n9
/kysL8yG+DPsUHB6f5ZZh/r7dsJDWeIea8ZI2gEMrGOIFxSZUcypwmjxxgC5Yo2x
EwRsGvw/GAKhQQX8ukgMMy878Qj7yRvf6PoMGlVqtjlmFRVXlgM=
=q2az
-----END PGP SIGNATURE-----
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH libdrm] meson: do not use cairo/valgrind if disabled
2018-02-19 12:15 ` [PATCH libdrm] meson: do not use cairo/valgrind if disabled Eric Engestrom
2018-02-19 12:50 ` Igor Gnatenko
2018-02-19 12:51 ` Igor Gnatenko
@ 2018-02-19 12:55 ` Igor Gnatenko
2 siblings, 0 replies; 4+ messages in thread
From: Igor Gnatenko @ 2018-02-19 12:55 UTC (permalink / raw)
To: dri-devel; +Cc: Igor Gnatenko
-Dcairo-tests=false currently results into enabling cairo support if it
was found. Same for valgrind.
v2:
* Use underscore-prefixed variables to not change type of variable
* Use empty array for "fake" dependency instead of real empty object
v3:
* Fix typo
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
---
meson.build | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/meson.build b/meson.build
index 166559e8..7f786a8c 100644
--- a/meson.build
+++ b/meson.build
@@ -32,8 +32,6 @@ pkg = import('pkgconfig')
with_udev = get_option('udev')
with_freedreno_kgsl = get_option('freedreno-kgsl')
with_install_tests = get_option('install-test-programs')
-with_cairo_tests = get_option('cairo-tests')
-with_valgrind = get_option('valgrind')
config = configuration_data()
@@ -226,8 +224,22 @@ endforeach
dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
-dep_cairo = dependency('cairo', required : with_cairo_tests == 'true')
-dep_valgrind = dependency('valgrind', required : with_valgrind == 'true')
+_cairo_tests = get_option('cairo-tests')
+if _cairo_tests != 'false'
+ dep_cairo = dependency('cairo', required : _cairo_tests == 'true')
+ with_cairo_tests = dep_cairo.found()
+else
+ dep_cairo = []
+ with_cairo_tests = false
+endif
+_valgrind = get_option('valgrind')
+if _valgrind != 'false'
+ dep_valgrind = dependency('valgrind', required : _valgrind == 'true')
+ with_valgrind = dep_valgrind.found()
+else
+ dep_valgrind = []
+ with_valgrind = false
+endif
with_man_pages = get_option('man-pages')
prog_xslt = find_program('xsltproc', required : with_man_pages == 'true')
@@ -259,8 +271,8 @@ foreach t : [
[with_radeon, 'RADEON'],
[with_vc4, 'VC4'],
[with_vmwgfx, 'VMWGFX'],
- [dep_cairo.found(), 'CAIRO'],
- [dep_valgrind.found(), 'VALGRIND'],
+ [with_cairo_tests, 'CAIRO'],
+ [with_valgrind, 'VALGRIND'],
]
config.set10('HAVE_@0@'.format(t[1]), t[0])
endforeach
--
2.16.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-19 12:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180218130050.17679-1-ignatenko@redhat.com>
2018-02-19 12:15 ` [PATCH libdrm] meson: do not use cairo/valgrind if disabled Eric Engestrom
2018-02-19 12:50 ` Igor Gnatenko
2018-02-19 12:51 ` Igor Gnatenko
2018-02-19 12:55 ` Igor Gnatenko
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.