aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/dev.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-01-08 13:23:52 -0800
committerDylan Baker <dylan@pnwbakers.com>2020-01-29 09:11:24 -0800
commitfd892ad7cec12a34287f65a57c44703a6f4e4119 (patch)
treeaba23134fa8670f3db8296c0db695833f4c1ddb4 /mesonbuild/dependencies/dev.py
parentf85d6cee6abd5d3f763240bcd0ab4e18daf60c95 (diff)
downloadmeson-fd892ad7cec12a34287f65a57c44703a6f4e4119.zip
meson-fd892ad7cec12a34287f65a57c44703a6f4e4119.tar.gz
meson-fd892ad7cec12a34287f65a57c44703a6f4e4119.tar.bz2
dependencies: Make Dependency initializer signatures match
Currently PkgConfig takes language as a keyword parameter in position 3, while the others take it as positional in position 2. Because most dependencies don't actually set a language (they use C style linking), using a positional argument makes more sense. ExtraFrameworkDependencies is even more different, and duplicates some arguments from the base ExternalDependency class. For later changes I'm planning to make having all of the dependencies use the same signature is really, really helpful.
Diffstat (limited to 'mesonbuild/dependencies/dev.py')
-rw-r--r--mesonbuild/dependencies/dev.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index 0488b2b..da19e90 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -46,7 +46,7 @@ def get_shared_library_suffix(environment, for_machine: MachineChoice):
class GTestDependency(ExternalDependency):
def __init__(self, environment, kwargs):
- super().__init__('gtest', environment, 'cpp', kwargs)
+ super().__init__('gtest', environment, kwargs, language='cpp')
self.main = kwargs.get('main', False)
self.src_dirs = ['/usr/src/gtest/src', '/usr/src/googletest/googletest/src']
self.detect()
@@ -119,7 +119,7 @@ class GTestDependency(ExternalDependency):
class GMockDependency(ExternalDependency):
def __init__(self, environment, kwargs):
- super().__init__('gmock', environment, 'cpp', kwargs)
+ super().__init__('gmock', environment, kwargs, language='cpp')
self.main = kwargs.get('main', False)
self._add_sub_dependency(ThreadDependency, environment, kwargs)
@@ -218,7 +218,7 @@ class LLVMDependencyConfigTool(ConfigToolDependency):
# It's necessary for LLVM <= 3.8 to use the C++ linker. For 3.9 and 4.0
# the C linker works fine if only using the C API.
- super().__init__('LLVM', environment, 'cpp', kwargs)
+ super().__init__('LLVM', environment, kwargs, language='cpp')
self.provided_modules = []
self.required_modules = set()
self.module_details = []
@@ -394,7 +394,7 @@ class LLVMDependencyCMake(CMakeDependency):
def __init__(self, env, kwargs):
self.llvm_modules = stringlistify(extract_as_list(kwargs, 'modules'))
self.llvm_opt_modules = stringlistify(extract_as_list(kwargs, 'optional_modules'))
- super().__init__(name='LLVM', environment=env, language='cpp', kwargs=kwargs)
+ super().__init__('LLVM', env, kwargs, language='cpp')
if self.traceparser is None:
return
@@ -435,7 +435,7 @@ class LLVMDependencyCMake(CMakeDependency):
class LLVMDependency(ExternalDependency):
def __init__(self, env, kwargs):
- super().__init__('LLVM', env, 'cpp', kwargs)
+ super().__init__('LLVM', env, kwargs, language='cpp')
@classmethod
def _factory(cls, env, kwargs):