aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/cmake/client.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-06-19 00:23:47 +0300
committerGitHub <noreply@github.com>2019-06-19 00:23:47 +0300
commit7d8bd4ffaba30e603f256ec6605f826a7ea75a7e (patch)
tree00d2a151705bdcbb5397be8e891612367fb57469 /mesonbuild/cmake/client.py
parenta1ea5fd16b5b5cb4d406b1185bb4b9653d85f1eb (diff)
parentb1cf0fd3806d9b159a3c6cc6b1bd2ef4d14a6021 (diff)
downloadmeson-7d8bd4ffaba30e603f256ec6605f826a7ea75a7e.zip
meson-7d8bd4ffaba30e603f256ec6605f826a7ea75a7e.tar.gz
meson-7d8bd4ffaba30e603f256ec6605f826a7ea75a7e.tar.bz2
Merge pull request #5457 from mensinda/cmakeRefactor
CMake code refactor
Diffstat (limited to 'mesonbuild/cmake/client.py')
-rw-r--r--mesonbuild/cmake/client.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/mesonbuild/cmake/client.py b/mesonbuild/cmake/client.py
index 93985e9..f77e0cc 100644
--- a/mesonbuild/cmake/client.py
+++ b/mesonbuild/cmake/client.py
@@ -16,8 +16,8 @@
# or an interpreter-based tool.
from .common import CMakeException
+from .executor import CMakeExecutor
from ..environment import Environment
-from ..dependencies.base import CMakeDependency, ExternalProgram
from ..mesonlib import MachineChoice
from .. import mlog
from contextlib import contextmanager
@@ -475,14 +475,11 @@ class CMakeClient:
if self.proc is not None:
raise CMakeException('The CMake server was already started')
for_machine = MachineChoice.HOST # TODO make parameter
- cmake_exe, cmake_vers, _ = CMakeDependency.find_cmake_binary(self.env, for_machine)
- if cmake_exe is None or cmake_exe is False:
- raise CMakeException('Unable to find CMake')
- assert(isinstance(cmake_exe, ExternalProgram))
+ cmake_exe = CMakeExecutor(self.env, '>=3.7', for_machine)
if not cmake_exe.found():
raise CMakeException('Unable to find CMake')
- mlog.debug('Starting CMake server with CMake', mlog.bold(' '.join(cmake_exe.get_command())), 'version', mlog.cyan(cmake_vers))
+ mlog.debug('Starting CMake server with CMake', mlog.bold(' '.join(cmake_exe.get_command())), 'version', mlog.cyan(cmake_exe.version()))
self.proc = Popen(cmake_exe.get_command() + ['-E', 'server', '--experimental', '--debug'], stdin=PIPE, stdout=PIPE)
def shutdown(self) -> None: