summaryrefslogtreecommitdiff
path: root/mesonbuild/cmake/executor.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-10-01 13:02:08 -0700
committerXavier Claessens <xclaesse@gmail.com>2021-03-19 08:47:10 -0400
commit40e3577a65ac688814eff1239fa38b86aad19ee8 (patch)
tree8329ecb3418c58c43ef7ccf1c0f354aab530ed5f /mesonbuild/cmake/executor.py
parentf7b0238ed67fc0c9e3cef38090983e33b40fa205 (diff)
downloadmeson-40e3577a65ac688814eff1239fa38b86aad19ee8.tar.gz
split program related classes and functions out of dependencies
Dependencies is already a large and complicated package without adding programs to the list. This also allows us to untangle a bit of spaghetti that we have.
Diffstat (limited to 'mesonbuild/cmake/executor.py')
-rw-r--r--mesonbuild/cmake/executor.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/mesonbuild/cmake/executor.py b/mesonbuild/cmake/executor.py
index 860d410c3..32c660a0e 100644
--- a/mesonbuild/cmake/executor.py
+++ b/mesonbuild/cmake/executor.py
@@ -23,12 +23,13 @@ import re
import os
from .. import mlog
+from ..environment import Environment
from ..mesonlib import PerMachine, Popen_safe, version_compare, MachineChoice, is_windows, OptionKey
+from ..programs import find_external_program, NonExistingExternalProgram
if T.TYPE_CHECKING:
from ..environment import Environment
- from ..dependencies.base import ExternalProgram
- from ..compilers import Compiler
+ from ..programs import ExternalProgram
TYPE_result = T.Tuple[int, T.Optional[str], T.Optional[str]]
TYPE_cache_key = T.Tuple[str, T.Tuple[str, ...], str, T.FrozenSet[T.Tuple[str, str]]]
@@ -65,9 +66,7 @@ class CMakeExecutor:
if self.prefix_paths:
self.extra_cmake_args += ['-DCMAKE_PREFIX_PATH={}'.format(';'.join(self.prefix_paths))]
- def find_cmake_binary(self, environment: 'Environment', silent: bool = False) -> T.Tuple[T.Optional['ExternalProgram'], T.Optional[str]]:
- from ..dependencies.base import find_external_program, NonExistingExternalProgram
-
+ def find_cmake_binary(self, environment: Environment, silent: bool = False) -> T.Tuple[T.Optional['ExternalProgram'], T.Optional[str]]:
# Only search for CMake the first time and store the result in the class
# definition
if isinstance(CMakeExecutor.class_cmakebin[self.for_machine], NonExistingExternalProgram):