aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Lavigne <alexandre.lavigne@scality.com>2020-04-21 16:08:45 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-04-22 00:10:25 +0300
commitbfea80677eef52271cde1c089268a6d544a79453 (patch)
treeb906013243bc5b1b305553d2e30e1a829bdbb14f
parent57b468c75ae90e09f8bd98da12a5c420ab49cd79 (diff)
downloadmeson-bfea80677eef52271cde1c089268a6d544a79453.zip
meson-bfea80677eef52271cde1c089268a6d544a79453.tar.gz
meson-bfea80677eef52271cde1c089268a6d544a79453.tar.bz2
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>
-rw-r--r--mesonbuild/cmake/executor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/cmake/executor.py b/mesonbuild/cmake/executor.py
index a41b293..66713a1 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: