[PATCH i-g-t] tests/kms_histogram: Add check for ghe api call
Lucas De Marchi
lucas.demarchi at intel.com
Wed Jan 8 14:17:11 UTC 2025
On Wed, Jan 08, 2025 at 06:16:37PM +0530, Mohammed Thasleem wrote:
>Check ghe algo for the function called by ghe igt while compiling.
>
>v2: Update version check and remove warning message. (Lucas)
> Print messae at api else check. (Kamil)
>
>Signed-off-by: Mohammed Thasleem <mohammed.thasleem at intel.com>
>---
> meson.build | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
>diff --git a/meson.build b/meson.build
>index 8b2a2a64a..6370887d6 100644
>--- a/meson.build
>+++ b/meson.build
>@@ -199,7 +199,17 @@ endif
>
> libghe = dependency('libghe', required : false)
this should be:
libghe = dependency('libghe', version : '>=0.2.0', required : false)
to be inline with how other dependencies are declared. No need to
special case this one. The output will be like this:
...
Run-time dependency xmlrpc found: NO (tried pkgconfig and cmake)
Run-time dependency xmlrpc_util found: NO (tried pkgconfig and cmake)
Run-time dependency xmlrpc_client found: NO (tried pkgconfig and cmake)
Program xmlrpc-c-config found: NO
Run-time dependency gsl found: NO (tried pkgconfig and cmake)
Run-time dependency alsa found: NO (tried pkgconfig and cmake)
Run-time dependency libcurl found: YES 8.5.0
Run-time dependency libghe found: NO (tried pkgconfig and cmake)
Run-time dependency threads found: YES
...
This is the diff on top I used:
diff --git a/meson.build b/meson.build
index 6370887d6..0130f7205 100644
--- a/meson.build
+++ b/meson.build
@@ -197,19 +197,9 @@ else
chamelium = disabler()
endif
-libghe = dependency('libghe', required : false)
+libghe = dependency('libghe', version : '>=0.2.0', required : false)
if libghe.found()
- if libghe.version().version_compare('>=0.2.0')
-
- cc = meson.get_compiler('c')
-
- if cc.has_function('histogram_compute_generate_data_bin', dependencies: libghe)
- message('libghe provides the required function')
- config.set('HAVE_LIBGHE', 1)
- else
- message ('libghe API changed')
- endif
- endif
+ config.set('HAVE_LIBGHE', 1)
endif
build_info += 'Build Chamelium test: @0@'.format(chamelium.found())
Lucas De Marchi
More information about the igt-dev
mailing list