summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@hora-obscura.de>2019-05-06 13:17:31 +0000
committerStefan Sauer <ensonic@hora-obscura.de>2019-05-06 13:17:31 +0000
commit5742bc1e1ff22cf99a416f0e3fa2b9a0c85725bd (patch)
tree7ac4377f112eb09d34fbf3ce3c242bdc4fe8d723
parent5ea36b00ebb528c96df5058898a216e7d591f2ac (diff)
parentbfc59c0c7b92fbf3b298bc366f7f584c3429a3f5 (diff)
downloadgtk-doc-5742bc1e1ff22cf99a416f0e3fa2b9a0c85725bd.tar.gz
Merge branch 'tests-option' into 'master'
Allow disabling the test suite See merge request GNOME/gtk-doc!26
-rw-r--r--meson.build3
-rw-r--r--meson_options.txt5
-rw-r--r--tests/gobject/meson.build2
-rw-r--r--tests/meson.build29
4 files changed, 23 insertions, 16 deletions
diff --git a/meson.build b/meson.build
index 080163a..7b43373 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