[libcamera-devel,v2] meson: Add 'all' choice to pipelines option
diff mbox series

Message ID 20221229164015.1650864-1-paul.elder@ideasonboard.com
State Accepted
Headers show
Series
  • [libcamera-devel,v2] meson: Add 'all' choice to pipelines option
Related show

Commit Message

Paul Elder Dec. 29, 2022, 4:40 p.m. UTC
Add an 'all' choice to the pipelines option, for building all pipelines.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Conditionally-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Conditionally-Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>

---
Changes in v2:
- specify what happens if both auto and all are selected
---
 meson.build       | 12 ++++++++++++
 meson_options.txt |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)

Comments

Laurent Pinchart Dec. 30, 2022, 8:19 p.m. UTC | #1
Hi Paul,

On Thu, Dec 29, 2022 at 10:40:15AM -0600, Paul Elder wrote:
> Add an 'all' choice to the pipelines option, for building all pipelines.
> 
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> Conditionally-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Conditionally-Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>

The idea of Conditionally-Reviewed-by is that you can drop the
"Conditionally-" prefix after applying the changes requested during
review :-)

> ---
> Changes in v2:
> - specify what happens if both auto and all are selected
> ---
>  meson.build       | 12 ++++++++++++
>  meson_options.txt |  3 ++-
>  2 files changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index df9099d0..24c31303 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -164,6 +164,18 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))
>  # are enabled.
>  pipelines = get_option('pipelines')
>  
> +if pipelines.contains('all')
> +    pipelines = [
> +        'imx8-isi',
> +        'ipu3',
> +        'raspberrypi',
> +        'rkisp1',
> +        'simple',
> +        'uvcvideo',
> +        'vimc'

A trailing comma would be nice to minimize changes when adding new
pipeline handlers (not sure which platform would go after vimc though).

Feel free to push this.

> +    ]
> +endif
> +
>  if pipelines.contains('auto')
>      host_cpu = host_machine.cpu_family()
>      pipelines = []
> diff --git a/meson_options.txt b/meson_options.txt
> index 793cda93..78a78b72 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -39,6 +39,7 @@ option('pipelines',
>          type : 'array',
>          value : ['auto'],
>          choices : [
> +            'all',
>              'auto',
>              'imx8-isi',
>              'ipu3',
> @@ -48,7 +49,7 @@ option('pipelines',
>              'uvcvideo',
>              'vimc'
>          ],
> -        description : 'Select which pipeline handlers to build. If this is set to auto, all the pipelines applicable to the target architecture will be built.')
> +        description : 'Select which pipeline handlers to build. If this is set to "auto", all the pipelines applicable to the target architecture will be built. If this is set to "all", all the pipelines will be built. If both are selected then "all" will take precedence.')
>  
>  option('qcam',
>          type : 'feature',

Patch
diff mbox series

diff --git a/meson.build b/meson.build
index df9099d0..24c31303 100644
--- a/meson.build
+++ b/meson.build
@@ -164,6 +164,18 @@  liblttng = dependency('lttng-ust', required : get_option('tracing'))
 # are enabled.
 pipelines = get_option('pipelines')
 
+if pipelines.contains('all')
+    pipelines = [
+        'imx8-isi',
+        'ipu3',
+        'raspberrypi',
+        'rkisp1',
+        'simple',
+        'uvcvideo',
+        'vimc'
+    ]
+endif
+
 if pipelines.contains('auto')
     host_cpu = host_machine.cpu_family()
     pipelines = []
diff --git a/meson_options.txt b/meson_options.txt
index 793cda93..78a78b72 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -39,6 +39,7 @@  option('pipelines',
         type : 'array',
         value : ['auto'],
         choices : [
+            'all',
             'auto',
             'imx8-isi',
             'ipu3',
@@ -48,7 +49,7 @@  option('pipelines',
             'uvcvideo',
             'vimc'
         ],
-        description : 'Select which pipeline handlers to build. If this is set to auto, all the pipelines applicable to the target architecture will be built.')
+        description : 'Select which pipeline handlers to build. If this is set to "auto", all the pipelines applicable to the target architecture will be built. If this is set to "all", all the pipelines will be built. If both are selected then "all" will take precedence.')
 
 option('qcam',
         type : 'feature',