aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/cmake/client.py
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-10-04 20:52:08 -0400
committerJohn Ericson <git@JohnEricson.me>2019-06-09 13:13:25 -0400
commit07777e15d47dbddaf849d24b3a30c85745c533ca (patch)
treef472472ed511498c329b4e13e19b1585e1afb621 /mesonbuild/cmake/client.py
parent32e827dcdc451e1c5dde952cf08e4b654eac7057 (diff)
downloadmeson-07777e15d47dbddaf849d24b3a30c85745c533ca.zip
meson-07777e15d47dbddaf849d24b3a30c85745c533ca.tar.gz
meson-07777e15d47dbddaf849d24b3a30c85745c533ca.tar.bz2
Purge `is_cross` and friends without changing user interfaces
In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.
Diffstat (limited to 'mesonbuild/cmake/client.py')
-rw-r--r--mesonbuild/cmake/client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/cmake/client.py b/mesonbuild/cmake/client.py
index f4b549b..93985e9 100644
--- a/mesonbuild/cmake/client.py
+++ b/mesonbuild/cmake/client.py
@@ -18,6 +18,7 @@
from .common import CMakeException
from ..environment import Environment
from ..dependencies.base import CMakeDependency, ExternalProgram
+from ..mesonlib import MachineChoice
from .. import mlog
from contextlib import contextmanager
from subprocess import Popen, PIPE, TimeoutExpired
@@ -473,8 +474,8 @@ class CMakeClient:
def startup(self) -> None:
if self.proc is not None:
raise CMakeException('The CMake server was already started')
-
- cmake_exe, cmake_vers, _ = CMakeDependency.find_cmake_binary(self.env)
+ 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))