[gnome-maps/wip/mlundblad/single-gjs-find-program] meson: Call find_program() once for GJS
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/single-gjs-find-program] meson: Call find_program() once for GJS
- Date: Sat, 8 May 2021 10:56:22 +0000 (UTC)
commit 5c7ff37628f01e1abc065e1c02a5640b0531a260
Author: Marcus Lundblad <ml update uu se>
Date: Sat May 8 12:54:39 2021 +0200
meson: Call find_program() once for GJS
Avoiding multiple calls to find_program()
for the generated test scripts.
meson.build | 2 ++
src/meson.build | 2 +-
tests/meson.build | 4 ++--
3 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 32597b3f..a8b297c2 100644
--- a/meson.build
+++ b/meson.build
@@ -49,6 +49,8 @@ top_inc = include_directories('.')
cc = meson.get_compiler('c')
+gjs = find_program('gjs')
+
subdir('po')
subdir('src')
subdir('lib')
diff --git a/src/meson.build b/src/meson.build
index 5cc7e5e3..49706a85 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,5 +1,5 @@
script_conf = configuration_data()
-script_conf.set('GJS', find_program('gjs').path())
+script_conf.set('GJS', gjs.path())
script_conf.set('PACKAGE_VERSION', version)
script_conf.set('libdir', libdir)
script_conf.set('prefix', prefix)
diff --git a/tests/meson.build b/tests/meson.build
index 3961d73f..e4b07369 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -4,7 +4,7 @@ tests = ['addressTest', 'boundingBoxTest', 'colorTest', 'osmNamesTest',
foreach test : tests
script_conf = configuration_data()
- script_conf.set('GJS', find_program('gjs').path())
+ script_conf.set('GJS', gjs.path())
script_conf.set('PACKAGE_VERSION', version)
script_conf.set('libdir', libdir)
script_conf.set('prefix', prefix)
@@ -19,7 +19,7 @@ foreach test : tests
endforeach
foreach test : tests
- test(test, find_program('gjs'),
+ test(test, gjs,
args: ['-I', meson.source_root() + '/src/', '-I',
meson.source_root() + '/tests/',
'tests/@0@'.format(test)],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]