diff options
| author | Alexandre Lavigne <alexandre.lavigne@scality.com> | 2020-04-21 16:08:45 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-04-22 00:10:25 +0300 |
| commit | bfea80677eef52271cde1c089268a6d544a79453 (patch) | |
| tree | b906013243bc5b1b305553d2e30e1a829bdbb14f /mesonbuild/cmake/executor.py | |
| parent | 57b468c75ae90e09f8bd98da12a5c420ab49cd79 (diff) | |
| download | meson-bfea80677eef52271cde1c089268a6d544a79453.tar.gz | |
Issue: 7009: CMake/Centos7 Unable to find CMake even though it is installed
On some systems the binary 'cmake' for version 3 is named 'cmake3',
therefor printing its version number prints:
'cmake3 version X.Y.Z' instead of 'cmake version X.Y.Z'
This '3' digit in the middle breaks the regular expression
extracting the version number.
The following fix permit both way to work and the regexp to
match the proper version number.
Signed-off-by: Alexandre Lavigne <alexandre.lavigne@scality.com>
Diffstat (limited to 'mesonbuild/cmake/executor.py')
| -rw-r--r-- | mesonbuild/cmake/executor.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/cmake/executor.py b/mesonbuild/cmake/executor.py index a41b293b4..66713a1e4 100644 --- a/mesonbuild/cmake/executor.py +++ b/mesonbuild/cmake/executor.py @@ -132,7 +132,7 @@ class CMakeExecutor: msg += '\n\nOn Unix-like systems this is often caused by scripts that are not executable.' mlog.warning(msg) return None - cmvers = re.sub(r'\s*cmake version\s*', '', out.split('\n')[0]).strip() + cmvers = re.sub(r'\s*(cmake|cmake3) version\s*', '', out.split('\n')[0]).strip() return cmvers def set_exec_mode(self, print_cmout: T.Optional[bool] = None, always_capture_stderr: T.Optional[bool] = None) -> None: |
