aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/cmake/interpreter.py1
-rw-r--r--mesonbuild/dependencies/base.py5
2 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py
index 5797c0d..4fac7b1 100644
--- a/mesonbuild/cmake/interpreter.py
+++ b/mesonbuild/cmake/interpreter.py
@@ -850,6 +850,7 @@ class CMakeInterpreter:
def configure(self, extra_cmake_options: T.List[str]) -> CMakeExecutor:
# Find CMake
+ # TODO: Using MachineChoice.BUILD should always be correct here, but also evaluate the use of self.for_machine
cmake_exe = CMakeExecutor(self.env, '>=3.7', MachineChoice.BUILD)
if not cmake_exe.found():
raise CMakeException('Unable to find CMake')
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 9026876..6f568d3 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -1098,10 +1098,11 @@ class CMakeDependency(ExternalDependency):
# AttributeError exceptions in derived classes
self.traceparser = None # type: CMakeTraceParser
- self.cmakebin = CMakeExecutor(environment, CMakeDependency.class_cmake_version, MachineChoice.BUILD, silent=self.silent)
+ # TODO further evaluate always using MachineChoice.BUILD
+ self.cmakebin = CMakeExecutor(environment, CMakeDependency.class_cmake_version, self.for_machine, silent=self.silent)
if not self.cmakebin.found():
self.cmakebin = None
- msg = 'No CMake binary for machine {} not found. Giving up.'.format(MachineChoice.BUILD)
+ msg = 'No CMake binary for machine {} not found. Giving up.'.format(self.for_machine)
if self.required:
raise DependencyException(msg)
mlog.debug(msg)