[v2] build: make gpudev optional
Checks
Commit Message
From: Elena Agostini <eagostini@nvidia.com>
This library can be made optional.
drivers/gpu and app/test-gpudev depend on this library,
so there is a check for dependencies.
Signed-off-by: Elena Agostini <eagostini@nvidia.com>
---
app/test-gpudev/meson.build | 1 +
doc/guides/prog_guide/gpudev.rst | 1 +
drivers/gpu/meson.build | 1 +
lib/meson.build | 1 +
4 files changed, 4 insertions(+)
Comments
On Wed, Nov 17, 2021 at 09:39:01PM +0000, eagostini@nvidia.com wrote:
> From: Elena Agostini <eagostini@nvidia.com>
>
> This library can be made optional.
> drivers/gpu and app/test-gpudev depend on this library,
> so there is a check for dependencies.
>
> Signed-off-by: Elena Agostini <eagostini@nvidia.com>
> ---
> app/test-gpudev/meson.build | 1 +
> doc/guides/prog_guide/gpudev.rst | 1 +
> drivers/gpu/meson.build | 1 +
> lib/meson.build | 1 +
> 4 files changed, 4 insertions(+)
>
> diff --git a/app/test-gpudev/meson.build b/app/test-gpudev/meson.build
> index 17bdef3646..02286d3a6a 100644
> --- a/app/test-gpudev/meson.build
> +++ b/app/test-gpudev/meson.build
> @@ -3,3 +3,4 @@
>
> sources = files('main.c')
> deps = ['gpudev', 'ethdev']
> +
This file and "drivers/gpu/meson.build" file can be removed from the patch,
since adding a blank line is unnecessary and is not related to the actual
patch changes. When preparing a patch, I'd suggest always double checking
that all changes introduced in the patch are intentional, and relevant to
the patch itself. If these whitespace fixups are intentional needed,
they should be sent as a separate patch just to make reviewing easier and
ensure each patch has only one logical change in it.
Thanks,
/Bruce
17/11/2021 22:39, eagostini@nvidia.com:
> From: Elena Agostini <eagostini@nvidia.com>
>
> This library can be made optional.
> drivers/gpu and app/test-gpudev depend on this library,
> so there is a check for dependencies.
Changed to
so they are automatically disabled if the lib is disabled.
> Signed-off-by: Elena Agostini <eagostini@nvidia.com>
Applied with blank lines fixed.
@@ -3,3 +3,4 @@
sources = files('main.c')
deps = ['gpudev', 'ethdev']
+
@@ -23,6 +23,7 @@ Out of scope of this library is to provide a wrapper for GPU specific libraries
on the device or create GPU specific objects
(e.g. CUDA Driver context or CUDA Streams in case of NVIDIA GPUs).
+This library is set as optional and can be disabled with ``-Ddisable_libs=gpudev``.
Features
--------
@@ -2,3 +2,4 @@
# Copyright (c) 2021 NVIDIA Corporation & Affiliates
drivers = [ 'cuda' ]
+
@@ -67,6 +67,7 @@ libraries = [
optional_libs = [
'bitratestats',
+ 'gpudev',
'gro',
'gso',
'kni',