diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2022-01-30 15:36:45 +0100 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-02-03 11:25:59 -0500 |
commit | 63870da44960e39d4e1c7d986f0e408bd1e14c74 (patch) | |
tree | 494b3bcbec86b142282260a481310564efb6fcf2 | |
parent | 78619e2c40f5766d2d914dcaf3da592ad405d8d7 (diff) | |
download | meson-63870da44960e39d4e1c7d986f0e408bd1e14c74.zip meson-63870da44960e39d4e1c7d986f0e408bd1e14c74.tar.gz meson-63870da44960e39d4e1c7d986f0e408bd1e14c74.tar.bz2 |
cmake: Deprecate CMake <3.17 support
-rw-r--r-- | docs/markdown/snippets/cmake_deprecation.md | 4 | ||||
-rw-r--r-- | mesonbuild/cmake/interpreter.py | 12 | ||||
-rw-r--r-- | mesonbuild/cmake/traceparser.py | 11 |
3 files changed, 15 insertions, 12 deletions
diff --git a/docs/markdown/snippets/cmake_deprecation.md b/docs/markdown/snippets/cmake_deprecation.md new file mode 100644 index 0000000..4a6730c --- /dev/null +++ b/docs/markdown/snippets/cmake_deprecation.md @@ -0,0 +1,4 @@ +## CMake support for versions <3.17.0 is deprecated + +Support for CMake versions below 3.17.0 is now deprecated for *both* CMake +dependencies and subprojects. diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py index d610312..44b7e57 100644 --- a/mesonbuild/cmake/interpreter.py +++ b/mesonbuild/cmake/interpreter.py @@ -31,7 +31,6 @@ from functools import lru_cache from pathlib import Path import typing as T import re -import textwrap from os import environ from ..mparser import ( @@ -824,17 +823,6 @@ class CMakeInterpreter: self.fileapi.setup_request() - if version_compare(cmake_exe.version(), '<3.17.0'): - mlog.warning(textwrap.dedent(f'''\ - The minimum recommended CMake version is 3.17.0. - | - | However, Meson was only able to find CMake {cmake_exe.version()} at {cmake_exe.cmakebin.command}. - | - | Support for all CMake versions below 3.17.0 will be deprecated and - | removed once newer CMake versions are more widely adopted. If you encounter - | any errors please try upgrading CMake to a newer version first. - ''')) - # Run CMake mlog.log() with mlog.nested(): diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py index 66dd4ef..a07082a 100644 --- a/mesonbuild/cmake/traceparser.py +++ b/mesonbuild/cmake/traceparser.py @@ -138,6 +138,17 @@ class CMakeTraceParser: 'meson_ps_disabled_function': self._meson_ps_disabled_function, } # type: T.Dict[str, T.Callable[[CMakeTraceLine], None]] + if version_compare(self.cmake_version, '<3.17.0'): + mlog.deprecation(textwrap.dedent(f'''\ + CMake support for versions <3.17 is deprecated since Meson 0.62.0. + | + | However, Meson was only able to find CMake {self.cmake_version}. + | + | Support for all CMake versions below 3.17.0 will be removed once + | newer CMake versions are more widely adopted. If you encounter + | any errors please try upgrading CMake to a newer version first. + '''), once=True) + def trace_args(self) -> T.List[str]: arg_map = { 'human': ['--trace', '--trace-expand'], |