cmake: Revert to using self.for_machine instead of MachineChoice.BUILD (fixes #8028)

pull/8106/head
Daniel Mensinger 4 years ago committed by Jussi Pakkanen
parent c415bc6cfb
commit 5c821edf26
  1. 1
      cross/linux-mingw-w64-32bit.txt
  2. 1
      cross/linux-mingw-w64-64bit.txt
  3. 1
      mesonbuild/cmake/interpreter.py
  4. 5
      mesonbuild/dependencies/base.py

@ -7,6 +7,7 @@ pkgconfig = '/usr/bin/i686-w64-mingw32-pkg-config'
windres = '/usr/bin/i686-w64-mingw32-windres'
exe_wrapper = 'wine'
ld = '/usr/bin/i686-w64-mingw32-ld'
cmake = '/usr/bin/cmake'
[properties]
# Directory that contains 'bin', 'lib', etc

@ -6,6 +6,7 @@ strip = '/usr/bin/x86_64-w64-mingw32-strip'
pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config'
windres = '/usr/bin/x86_64-w64-mingw32-windres'
exe_wrapper = 'wine64'
cmake = '/usr/bin/cmake'
[properties]
# Directory that contains 'bin', 'lib', etc

@ -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')

@ -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)

Loading…
Cancel
Save