aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-12-14 21:50:50 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2020-12-16 21:50:27 +0000
commit5c821edf26babbb412a59024dd881f75e9cfe3ff (patch)
tree1740b9b318796407775859d72876a5457a7c97dc /mesonbuild
parentc415bc6cfbfe96596fab504535b0fa974912f785 (diff)
downloadmeson-5c821edf26babbb412a59024dd881f75e9cfe3ff.zip
meson-5c821edf26babbb412a59024dd881f75e9cfe3ff.tar.gz
meson-5c821edf26babbb412a59024dd881f75e9cfe3ff.tar.bz2
cmake: Revert to using self.for_machine instead of MachineChoice.BUILD (fixes #8028)
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)