diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2019-04-21 12:54:18 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2019-05-06 13:34:40 +0100 |
commit | bfc59c0c7b92fbf3b298bc366f7f584c3429a3f5 (patch) | |
tree | 7bfb317e1b1a8148e26f3e4d3058de9293313c54 | |
parent | 83a9b030ff74fb264b194fa5e33cc2733aa2b7c8 (diff) | |
download | gtk-doc-bfc59c0c7b92fbf3b298bc366f7f584c3429a3f5.tar.gz |
Allow disabling the test suite
The GTK-Doc test suite depends on GLib/GObject, which creates a circular
dependency between GLib and GTK-Doc. By adding an option to build
GTK-Doc without its test suite, we can break the circular dependency.
-rw-r--r-- | meson.build | 3 | ||||
-rw-r--r-- | meson_options.txt | 5 | ||||
-rw-r--r-- | tests/gobject/meson.build | 2 | ||||
-rw-r--r-- | tests/meson.build | 29 |
4 files changed, 23 insertions, 16 deletions
diff --git a/meson.build b/meson.build index 46277e7..0cb5047 100644 --- a/meson.build +++ b/meson.build @@ -32,8 +32,6 @@ pkgconfigdir = join_paths(datadir, 'pkgconfig') glib_req = '>= 2.38.0' python3_req = '>= 3.4.0' -glib_dep = dependency('glib-2.0', version: glib_req) -gobject_dep = dependency('gobject-2.0', version: glib_req) python3_dep = dependency('python3', version: python3_req) python_prg = python.find_python() @@ -162,6 +160,7 @@ summary = [ ' CMake support: @0@'.format(get_option('cmake_support')), ' PDF output: @0@'.format(generate_pdf_output), ' User manual: @0@'.format(get_option('yelp_manual')), + ' Test suite: @0@'.format(get_option('tests')), '------', ] diff --git a/meson_options.txt b/meson_options.txt index ce44377..f1f54a4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,4 +6,7 @@ option('cmake_support', description: 'Install CMake macros') option('yelp_manual', type: 'boolean', value: true, - description: 'Build the user manual (requires yelp-tools)')
\ No newline at end of file + description: 'Build the user manual (requires yelp-tools)') +option('tests', + type: 'boolean', value: true, + description: 'Build the test suite (requires glib)') diff --git a/tests/gobject/meson.build b/tests/gobject/meson.build index dc00692..d7525bd 100644 --- a/tests/gobject/meson.build +++ b/tests/gobject/meson.build @@ -1,2 +1,2 @@ subdir('src') -subdir('docs')
\ No newline at end of file +subdir('docs') diff --git a/tests/meson.build b/tests/meson.build index b48f978..a60cf46 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,9 +1,3 @@ -glib_prefix = glib_dep.get_pkgconfig_variable('prefix') -glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') - -gobject_prefix = gobject_dep.get_pkgconfig_variable('prefix') -gobject_docpath = join_paths(gobject_prefix, 'share', 'gtk-doc', 'html') - gtkdoc_unit_tests = [ 'check', 'common', @@ -31,9 +25,20 @@ endforeach subdir('helpers') -subdir('annotations') -subdir('bugs') -subdir('empty') -subdir('fail') -subdir('gobject') -subdir('program') +if get_option('tests') == true + glib_dep = dependency('glib-2.0', version: glib_req) + gobject_dep = dependency('gobject-2.0', version: glib_req) + + glib_prefix = glib_dep.get_pkgconfig_variable('prefix') + glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') + + gobject_prefix = gobject_dep.get_pkgconfig_variable('prefix') + gobject_docpath = join_paths(gobject_prefix, 'share', 'gtk-doc', 'html') + + subdir('annotations') + subdir('bugs') + subdir('empty') + subdir('fail') + subdir('gobject') + subdir('program') +endif |