diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2022-02-11 16:07:35 +0100 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2022-02-11 16:07:35 +0100 |
commit | c9b2b53059a2fc23eb939e98a59c61c2414ec3f8 (patch) | |
tree | 03d6389d8991b8cbc1f154ab6471cb557e650034 | |
parent | afac37ad1dab41202ceecfe50315d0074e372f21 (diff) | |
download | sigc++-c9b2b53059a2fc23eb939e98a59c61c2414ec3f8.tar.gz |
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-- | .github/workflows/meson-clang-10.yml | 4 | ||||
-rw-r--r-- | .github/workflows/meson-gcc-9.yml | 4 | ||||
-rw-r--r-- | MSVC_NMake/meson.build | 2 | ||||
-rw-r--r-- | docs/docs/manual/meson.build | 3 | ||||
-rw-r--r-- | docs/docs/reference/meson.build | 4 | ||||
-rw-r--r-- | examples/meson.build | 1 | ||||
-rw-r--r-- | meson.build | 20 | ||||
-rw-r--r-- | tests/meson.build | 2 |
8 files changed, 21 insertions, 19 deletions
diff --git a/.github/workflows/meson-clang-10.yml b/.github/workflows/meson-clang-10.yml index fda48da..13f611b 100644 --- a/.github/workflows/meson-clang-10.yml +++ b/.github/workflows/meson-clang-10.yml @@ -15,9 +15,9 @@ jobs: export ENV DEBIAN_FRONTEND=noninteractive sudo apt update sudo apt install libxml2-utils docbook5-xml docbook-xsl mm-common clang-10 ninja-build python3-setuptools python3-pip --yes - # Ubuntu 20.04 contains meson 0.53.2, but libsigc++ requires meson >= 0.54.0. + # Ubuntu 20.04 contains meson 0.53.2, but libsigc++ requires meson >= 0.55.0. # Install it with pip3 instead of apt. - sudo pip3 install "meson>=0.54.0" + sudo pip3 install "meson>=0.55.0" export CXX=clang++-10 meson -Dwarnings=fatal _build cd _build diff --git a/.github/workflows/meson-gcc-9.yml b/.github/workflows/meson-gcc-9.yml index 0543b32..96b160f 100644 --- a/.github/workflows/meson-gcc-9.yml +++ b/.github/workflows/meson-gcc-9.yml @@ -15,9 +15,9 @@ jobs: export ENV DEBIAN_FRONTEND=noninteractive sudo apt update sudo apt install libxml2-utils docbook5-xml docbook-xsl mm-common g++-9 ninja-build python3-setuptools python3-pip --yes - # Ubuntu 20.04 contains meson 0.53.2, but libsigc++ requires meson >= 0.54.0. + # Ubuntu 20.04 contains meson 0.53.2, but libsigc++ requires meson >= 0.55.0. # Install it with pip3 instead of apt. - sudo pip3 install "meson>=0.54.0" + sudo pip3 install "meson>=0.55.0" export CXX=g++-9 meson -Dwarnings=fatal _build cd _build diff --git a/MSVC_NMake/meson.build b/MSVC_NMake/meson.build index f9ddc35..09078b3 100644 --- a/MSVC_NMake/meson.build +++ b/MSVC_NMake/meson.build @@ -23,7 +23,7 @@ handle_built_files = project_source_root / 'tools' / 'handle-built-files.py' if can_add_dist_script # Distribute built files. meson.add_dist_script( - python3.path(), handle_built_files, 'dist_gen_msvc_files', + python3, handle_built_files, 'dist_gen_msvc_files', meson.current_build_dir(), untracked_msvc_nmake, project_build_root / 'sigc++config.h', diff --git a/docs/docs/manual/meson.build b/docs/docs/manual/meson.build index e632131..8c721c8 100644 --- a/docs/docs/manual/meson.build +++ b/docs/docs/manual/meson.build @@ -31,6 +31,7 @@ if xmllint.found() validate, meson.current_source_dir() / 'can_use_xmllint.xml', meson.current_build_dir() / 'can_use_xmllint.stamp', + check: false, ).returncode() == 0 if not can_parse_and_validate # The DocBook V5.0 package is called docbook5-xml in Ubuntu, @@ -95,7 +96,7 @@ endif if can_add_dist_script # Distribute built files. meson.add_dist_script( - python3.path(), tutorial_custom_cmd, 'dist_doc', + python3, tutorial_custom_cmd, 'dist_doc', doc_dist_dir, meson.current_build_dir(), meson.current_source_dir() / sigc_manual_xml, diff --git a/docs/docs/reference/meson.build b/docs/docs/reference/meson.build index 397e975..e0c0c4b 100644 --- a/docs/docs/reference/meson.build +++ b/docs/docs/reference/meson.build @@ -120,7 +120,7 @@ devhelp_file = custom_target('devhelp', # Install Devhelp file and html files. meson.add_install_script( - python3.path(), doc_reference, 'install_doc', + python3, doc_reference, 'install_doc', doctool_dir, devhelp_file.full_path(), install_devhelpdir, @@ -131,7 +131,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, 'dist_doc', + python3, doc_reference, 'dist_doc', doctool_dir, doctool_dist_dir, meson.current_build_dir(), diff --git a/examples/meson.build b/examples/meson.build index 3779f72..c55bfdd 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -23,7 +23,6 @@ foreach ex : examples cpp_args: '-DSIGCXX_DISABLE_DEPRECATED', dependencies: sigcxx_own_dep, implicit_include_directories: false, - gui_app: false, build_by_default: build_examples ) endforeach diff --git a/meson.build b/meson.build index 2e30933..bc2e1d8 100644 --- a/meson.build +++ b/meson.build @@ -7,8 +7,8 @@ project('libsigc++', 'cpp', 'cpp_std=c++17', 'warning_level=0', ], - 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, ...) ) sigcxx_api_version = '3.0' @@ -56,7 +56,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 @@ -130,14 +130,16 @@ tutorial_custom_cmd = project_source_root / 'tools' / 'tutorial-custom-cmd.py' if maintainer_mode # Copy files to untracked/build_scripts and untracked/docs/docs. run_command(mm_common_get, '--force', script_dir, - project_source_root / 'untracked' / 'docs' / 'docs') + project_source_root / 'untracked' / 'docs' / 'docs', + check: true, + ) else cmd_py = ''' import os import sys sys.exit(os.path.isfile("@0@")) '''.format(doc_reference) - 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.') @@ -148,7 +150,9 @@ endif doc_perl_prop = run_command( python3, doc_reference, '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) @@ -243,13 +247,13 @@ subdir('docs/docs/manual') if can_add_dist_script # Add a ChangeLog file to the distribution directory. meson.add_dist_script( - python3.path(), dist_changelog, + python3, dist_changelog, 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, + python3, dist_build_scripts, project_source_root, 'untracked' / 'build_scripts', ) diff --git a/tests/meson.build b/tests/meson.build index 5b6b0c7..87605a4 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -67,7 +67,6 @@ foreach ex : test_programs exe_file = executable(ex_name, ex_sources, dependencies: sigcxx_own_dep, implicit_include_directories: false, - gui_app: false, build_by_default: true ) @@ -89,7 +88,6 @@ if can_benchmark exe_file = executable(ex_name, ex_sources, dependencies: [sigcxx_own_dep, benchmark_dep], implicit_include_directories: false, - gui_app: false, build_by_default: do_benchmark ) |