diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-12-14 21:50:50 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-12-16 21:50:27 +0000 |
commit | 5c821edf26babbb412a59024dd881f75e9cfe3ff (patch) | |
tree | 1740b9b318796407775859d72876a5457a7c97dc | |
parent | c415bc6cfbfe96596fab504535b0fa974912f785 (diff) | |
download | meson-5c821edf26babbb412a59024dd881f75e9cfe3ff.zip meson-5c821edf26babbb412a59024dd881f75e9cfe3ff.tar.gz meson-5c821edf26babbb412a59024dd881f75e9cfe3ff.tar.bz2 |
cmake: Revert to using self.for_machine instead of MachineChoice.BUILD (fixes #8028)
-rw-r--r-- | cross/linux-mingw-w64-32bit.txt | 1 | ||||
-rw-r--r-- | cross/linux-mingw-w64-64bit.txt | 1 | ||||
-rw-r--r-- | mesonbuild/cmake/interpreter.py | 1 | ||||
-rw-r--r-- | mesonbuild/dependencies/base.py | 5 |
4 files changed, 6 insertions, 2 deletions
diff --git a/cross/linux-mingw-w64-32bit.txt b/cross/linux-mingw-w64-32bit.txt index a62f57f..e29aa46 100644 --- a/cross/linux-mingw-w64-32bit.txt +++ b/cross/linux-mingw-w64-32bit.txt @@ -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 diff --git a/cross/linux-mingw-w64-64bit.txt b/cross/linux-mingw-w64-64bit.txt index 36d7350..261dad0 100644 --- a/cross/linux-mingw-w64-64bit.txt +++ b/cross/linux-mingw-w64-64bit.txt @@ -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 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) |