summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2022-02-13 13:44:48 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2022-02-13 13:44:48 +0100
commita9390a902828ad621a87a47a426ca122ed8be030 (patch)
treea5d7fcc7abaa2e5fd11e35c7d9154e23593ad1da
parentf33fd2c8f35b7ee1852f62f3f7389b09075e1e0f (diff)
meson.build: Specify 'check' option in run_command()
The default value will be changed in future Meson releases. Don't use deprecated python3.path() and execute(..., gui_app: ...).
-rw-r--r--docs/reference/meson.build4
-rw-r--r--examples/meson.build1
-rw-r--r--meson.build20
-rw-r--r--tests/meson.build1
4 files changed, 14 insertions, 12 deletions
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index ab7c9f8..37641f4 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -118,7 +118,7 @@ devhelp_file = custom_target('devhelp',
# Install Devhelp file and html files.
meson.add_install_script(
- python3.path(), doc_reference_py, 'install_doc',
+ python3, doc_reference_py, 'install_doc',
doctool_dir,
devhelp_file.full_path(),
install_devhelpdir,
@@ -129,7 +129,7 @@ meson.add_install_script(
if can_add_dist_script
# Distribute built files and files copied by mm-common-get.
meson.add_dist_script(
- python3.path(), doc_reference_py, 'dist_doc',
+ python3, doc_reference_py, 'dist_doc',
doctool_dir,
doctool_dist_dir,
meson.current_build_dir(),
diff --git a/examples/meson.build b/examples/meson.build
index bc948b6..674b9fb 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -34,7 +34,6 @@ foreach ex : examples
cpp_args: [ '-DCAIROMM_DISABLE_DEPRECATED' ] + ex_disabled_warnings,
dependencies: cairomm_own_dep,
implicit_include_directories: false,
- gui_app: false,
build_by_default: build_examples
)
endforeach
diff --git a/meson.build b/meson.build
index 3a4f63a..e130814 100644
--- a/meson.build
+++ b/meson.build
@@ -6,8 +6,8 @@ project('cairomm', 'cpp',
default_options: [
'cpp_std=c++11',
],
- meson_version: '>= 0.54.0', # required for meson.override_dependency()
- # and dep.get_variable(internal:)
+ meson_version: '>= 0.55.0', # required for meson.add_dist_script(python3, ...)
+ # and meson.add_install_script(python3, ...)
)
cairomm_api_version = '1.0'
@@ -59,7 +59,7 @@ import os
import sys
sys.exit(os.path.isdir("@0@") or os.path.isfile("@0@"))
'''.format(project_source_root / '.git')
-is_git_build = run_command(python3, '-c', cmd_py).returncode() != 0
+is_git_build = run_command(python3, '-c', cmd_py, check: false).returncode() != 0
# Are we testing a dist tarball while it's being built?
# There ought to be a better way. https://github.com/mesonbuild/meson/issues/6866
@@ -169,14 +169,16 @@ dist_build_scripts_py = script_dir / 'dist-build-scripts.py'
if maintainer_mode
# Copy files to untracked/build_scripts and untracked/docs.
run_command(mm_common_get, '--force', script_dir,
- project_source_root / 'untracked' / 'docs')
+ project_source_root / 'untracked' / 'docs',
+ check: true,
+ )
else
cmd_py = '''
import os
import sys
sys.exit(os.path.isfile("@0@"))
'''.format(doc_reference_py)
- file_exists = run_command(python3, '-c', cmd_py).returncode() != 0
+ file_exists = run_command(python3, '-c', cmd_py, check: false).returncode() != 0
if not file_exists
warning('Missing files in untracked/. ' + \
'Enable maintainer-mode if you want to build documentation or create a dist tarball.')
@@ -187,7 +189,9 @@ endif
doc_perl_prop = run_command(
python3, doc_reference_py, 'get_script_property',
'', # MMDOCTOOLDIR is not used
- 'requires_perl')
+ 'requires_perl',
+ check: false,
+)
if not (doc_perl_prop.returncode() == 0 and doc_perl_prop.stdout() == 'false')
# Perl is required, if documentation shall be built.
perl = find_program('perl', required: build_documentation)
@@ -281,13 +285,13 @@ subdir('docs/reference')
if can_add_dist_script
# Add a ChangeLog file to the distribution directory.
meson.add_dist_script(
- python3.path(), dist_changelog_py,
+ python3, dist_changelog_py,
project_source_root,
)
# Add build scripts to the distribution directory, and delete .gitignore
# files and an empty $MESON_PROJECT_DIST_ROOT/build/ directory.
meson.add_dist_script(
- python3.path(), dist_build_scripts_py,
+ python3, dist_build_scripts_py,
project_source_root,
'untracked' / 'build_scripts',
)
diff --git a/tests/meson.build b/tests/meson.build
index eb2f69c..7854d5e 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -36,7 +36,6 @@ if can_test
cpp_args: ex[3] + boost_test_modname_flag + cairomm_tests_extra_cppargs,
dependencies: [cairomm_own_dep, test_dep],
implicit_include_directories: false,
- gui_app: false,
build_by_default: build_tests,
)