More robust cmake version detection

pull/7115/head
Reza Housseini 5 years ago committed by Jussi Pakkanen
parent 9492eec55f
commit 10dc8f3c7c
  1. 2
      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:

Loading…
Cancel
Save