diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-05-30 16:33:09 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-05-30 16:33:09 +0200 |
commit | 9b5463681e8f5df8dbe628be0a95982584b2343b (patch) | |
tree | ba0bfce27a7355a7f1674d2e4e86a8328d206669 /mesonbuild/cmake/interpreter.py | |
parent | f0812baf8d1c746a4b5b7d8661a4e3d13af577b7 (diff) | |
download | meson-9b5463681e8f5df8dbe628be0a95982584b2343b.zip meson-9b5463681e8f5df8dbe628be0a95982584b2343b.tar.gz meson-9b5463681e8f5df8dbe628be0a95982584b2343b.tar.bz2 |
cmake: select correct generator in toolchain.py
Diffstat (limited to 'mesonbuild/cmake/interpreter.py')
-rw-r--r-- | mesonbuild/cmake/interpreter.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py index 26fc635..cc6adf1 100644 --- a/mesonbuild/cmake/interpreter.py +++ b/mesonbuild/cmake/interpreter.py @@ -15,7 +15,7 @@ # This class contains the basic functionality needed to run any interpreter # or an interpreter-based tool. -from .common import CMakeException, CMakeTarget, TargetOptions, CMakeConfiguration, language_map, check_cmake_args +from .common import CMakeException, CMakeTarget, TargetOptions, CMakeConfiguration, language_map, backend_generator_map, cmake_get_generator_args, check_cmake_args from .client import CMakeClient, RequestCMakeInputs, RequestConfigure, RequestCompute, RequestCodeModel, ReplyCMakeInputs, ReplyCodeModel from .fileapi import CMakeFileAPI from .executor import CMakeExecutor @@ -74,15 +74,6 @@ disable_policy_warnings = [ 'CMP0102', ] -backend_generator_map = { - 'ninja': 'Ninja', - 'xcode': 'Xcode', - 'vs2010': 'Visual Studio 10 2010', - 'vs2015': 'Visual Studio 15 2017', - 'vs2017': 'Visual Studio 15 2017', - 'vs2019': 'Visual Studio 16 2019', -} - target_type_map = { 'STATIC_LIBRARY': 'static_library', 'MODULE_LIBRARY': 'shared_module', @@ -898,9 +889,8 @@ class CMakeInterpreter: # TODO: drop this check once the deprecated `cmake_args` kwarg is removed extra_cmake_options = check_cmake_args(extra_cmake_options) - generator = backend_generator_map[self.backend_name] cmake_args = [] - cmake_args += ['-G', generator] + cmake_args += cmake_get_generator_args(self.env) cmake_args += [f'-DCMAKE_INSTALL_PREFIX={self.install_prefix}'] cmake_args += extra_cmake_options trace_args = self.trace.trace_args() |