diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2022-09-21 10:37:21 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2022-09-21 10:37:21 +0200 |
commit | 6a2f0fcf3a49bbea8355494ed8ed0c9279aa08d4 (patch) | |
tree | 726733663d97280e56799c8b87f5d342888abe89 | |
parent | cf66f63fe026a7fb8e101c8549fb8a88635a84d6 (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.build | 4 | ||||
-rw-r--r-- | examples/meson.build | 1 | ||||
-rw-r--r-- | meson.build | 20 | ||||
-rw-r--r-- | tests/meson.build | 1 |
4 files changed, 14 insertions, 12 deletions
diff --git a/docs/reference/meson.build b/docs/reference/meson.build index 74f3c45..4d36af8 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 1fa2da0..9ed13a0 100644 --- a/meson.build +++ b/meson.build @@ -6,8 +6,8 @@ project('cairomm', 'cpp', default_options: [ 'cpp_std=c++17', ], - 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.16' @@ -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 @@ -176,14 +176,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.') @@ -194,7 +196,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) @@ -284,7 +288,7 @@ 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, ) # Don't distribute these files and directories. @@ -295,7 +299,7 @@ if can_add_dist_script # 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', dont_distribute, 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, ) |