aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReza Housseini <reza.housseini@mecos.com>2020-05-07 15:20:41 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-05-08 22:47:09 +0300
commit10dc8f3c7cea6f236171e9eb2f3c3e123e7fec85 (patch)
treede92b208c1464e92f2159daaf59201c979a5df77
parent9492eec55fb8a3dc8c5cc11182621e98d15e8729 (diff)
downloadmeson-10dc8f3c7cea6f236171e9eb2f3c3e123e7fec85.zip
meson-10dc8f3c7cea6f236171e9eb2f3c3e123e7fec85.tar.gz
meson-10dc8f3c7cea6f236171e9eb2f3c3e123e7fec85.tar.bz2
More robust cmake version detection
-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 66713a1..adc028c 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|cmake3) version\s*', '', out.split('\n')[0]).strip()
+ cmvers = re.search(r'(cmake|cmake3)\s*version\s*([\d.]+)', out).group(2)
return cmvers
def set_exec_mode(self, print_cmout: T.Optional[bool] = None, always_capture_stderr: T.Optional[bool] = None) -> None: