diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2019-10-01 11:04:48 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2019-10-01 13:30:15 -0400 |
commit | 90a12ed3f06e616653f8b78d9966cc80ab331d27 (patch) | |
tree | 24542476eda4b1a898d0d2ac5f94720c22b03aad | |
parent | a4b0d216b58ab039cac086b4fb676ac6fe0eeb6e (diff) | |
download | meson-90a12ed3f06e616653f8b78d9966cc80ab331d27.zip meson-90a12ed3f06e616653f8b78d9966cc80ab331d27.tar.gz meson-90a12ed3f06e616653f8b78d9966cc80ab331d27.tar.bz2 |
cmake: Fix 'properies' typo
-rw-r--r-- | mesonbuild/cmake/interpreter.py | 4 | ||||
-rw-r--r-- | mesonbuild/cmake/traceparser.py | 30 | ||||
-rw-r--r-- | mesonbuild/dependencies/base.py | 48 |
3 files changed, 41 insertions, 41 deletions
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py index 84a3907..773e2ec 100644 --- a/mesonbuild/cmake/interpreter.py +++ b/mesonbuild/cmake/interpreter.py @@ -201,7 +201,7 @@ class ConverterTarget: # Use the CMake trace, if required if self.type.upper() in target_type_requires_trace: if self.name in trace.targets: - props = trace.targets[self.name].properies + props = trace.targets[self.name].properties self.includes += props.get('INTERFACE_INCLUDE_DIRECTORIES', []) self.public_compile_opts += props.get('INTERFACE_COMPILE_DEFINITIONS', []) @@ -590,7 +590,7 @@ class CMakeInterpreter: output_target_map[i.full_name] = i output_target_map[_target_key(i.name)] = i ttarget = self.trace.targets.get(i.name) - soversion = ttarget.properies.get('SOVERSION') if ttarget else None + soversion = ttarget.properties.get('SOVERSION') if ttarget else None if soversion: k = '{}.{}'.format(i.full_name, soversion[0]) output_target_map[k] = i diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py index 1e0b076..78ee5ae 100644 --- a/mesonbuild/cmake/traceparser.py +++ b/mesonbuild/cmake/traceparser.py @@ -35,18 +35,18 @@ class CMakeTraceLine: return s.format(self.file, self.line, self.func, self.args) class CMakeTarget: - def __init__(self, name, target_type, properies=None): - if properies is None: - properies = {} + def __init__(self, name, target_type, properties=None): + if properties is None: + properties = {} self.name = name self.type = target_type - self.properies = properies + self.properties = properties def __repr__(self): - s = 'CMake TARGET:\n -- name: {}\n -- type: {}\n -- properies: {{\n{} }}' + s = 'CMake TARGET:\n -- name: {}\n -- type: {}\n -- properties: {{\n{} }}' propSTR = '' - for i in self.properies: - propSTR += " '{}': {}\n".format(i, self.properies[i]) + for i in self.properties: + propSTR += " '{}': {}\n".format(i, self.properties[i]) return s.format(self.name, self.type, propSTR) class CMakeGeneratorTarget: @@ -339,13 +339,13 @@ class CMakeTraceParser: if i not in self.targets: return self._gen_exception('set_property', 'TARGET {} not found'.format(i), tline) - if identifier not in self.targets[i].properies: - self.targets[i].properies[identifier] = [] + if identifier not in self.targets[i].properties: + self.targets[i].properties[identifier] = [] if append: - self.targets[i].properies[identifier] += value + self.targets[i].properties[identifier] += value else: - self.targets[i].properies[identifier] = value + self.targets[i].properties[identifier] = value def _cmake_set_target_properties(self, tline: CMakeTraceLine) -> None: # DOC: https://cmake.org/cmake/help/latest/command/set_target_properties.html @@ -392,7 +392,7 @@ class CMakeTraceParser: if i not in self.targets: return self._gen_exception('set_target_properties', 'TARGET {} not found'.format(i), tline) - self.targets[i].properies[name] = value + self.targets[i].properties[name] = value def _cmake_target_compile_definitions(self, tline: CMakeTraceLine) -> None: # DOC: https://cmake.org/cmake/help/latest/command/target_compile_definitions.html @@ -449,10 +449,10 @@ class CMakeTraceParser: private = [x for x in private if x] for i in [(private_prop, private), (interface_prop, interface)]: - if not i[0] in self.targets[target].properies: - self.targets[target].properies[i[0]] = [] + if not i[0] in self.targets[target].properties: + self.targets[target].properties[i[0]] = [] - self.targets[target].properies[i[0]] += i[1] + self.targets[target].properties[i[0]] += i[1] def _lex_trace(self, trace): # The trace format is: '<file>(<line>): <func>(<args -- can contain \n> )\n' diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index e32f983..2065ad5 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -1402,38 +1402,38 @@ class CMakeDependency(ExternalDependency): otherDeps = [] mlog.debug(tgt) - if 'INTERFACE_INCLUDE_DIRECTORIES' in tgt.properies: - incDirs += [x for x in tgt.properies['INTERFACE_INCLUDE_DIRECTORIES'] if x] + if 'INTERFACE_INCLUDE_DIRECTORIES' in tgt.properties: + incDirs += [x for x in tgt.properties['INTERFACE_INCLUDE_DIRECTORIES'] if x] - if 'INTERFACE_COMPILE_DEFINITIONS' in tgt.properies: - compileDefinitions += ['-D' + re.sub('^-D', '', x) for x in tgt.properies['INTERFACE_COMPILE_DEFINITIONS'] if x] + if 'INTERFACE_COMPILE_DEFINITIONS' in tgt.properties: + compileDefinitions += ['-D' + re.sub('^-D', '', x) for x in tgt.properties['INTERFACE_COMPILE_DEFINITIONS'] if x] - if 'INTERFACE_COMPILE_OPTIONS' in tgt.properies: - compileOptions += [x for x in tgt.properies['INTERFACE_COMPILE_OPTIONS'] if x] + if 'INTERFACE_COMPILE_OPTIONS' in tgt.properties: + compileOptions += [x for x in tgt.properties['INTERFACE_COMPILE_OPTIONS'] if x] - if 'IMPORTED_CONFIGURATIONS' in tgt.properies: - cfgs = [x for x in tgt.properies['IMPORTED_CONFIGURATIONS'] if x] + if 'IMPORTED_CONFIGURATIONS' in tgt.properties: + cfgs = [x for x in tgt.properties['IMPORTED_CONFIGURATIONS'] if x] cfg = cfgs[0] if 'RELEASE' in cfgs: cfg = 'RELEASE' - if 'IMPORTED_IMPLIB_{}'.format(cfg) in tgt.properies: - libraries += [x for x in tgt.properies['IMPORTED_IMPLIB_{}'.format(cfg)] if x] - elif 'IMPORTED_IMPLIB' in tgt.properies: - libraries += [x for x in tgt.properies['IMPORTED_IMPLIB'] if x] - elif 'IMPORTED_LOCATION_{}'.format(cfg) in tgt.properies: - libraries += [x for x in tgt.properies['IMPORTED_LOCATION_{}'.format(cfg)] if x] - elif 'IMPORTED_LOCATION' in tgt.properies: - libraries += [x for x in tgt.properies['IMPORTED_LOCATION'] if x] - - if 'INTERFACE_LINK_LIBRARIES' in tgt.properies: - otherDeps += [x for x in tgt.properies['INTERFACE_LINK_LIBRARIES'] if x] - - if 'IMPORTED_LINK_DEPENDENT_LIBRARIES_{}'.format(cfg) in tgt.properies: - otherDeps += [x for x in tgt.properies['IMPORTED_LINK_DEPENDENT_LIBRARIES_{}'.format(cfg)] if x] - elif 'IMPORTED_LINK_DEPENDENT_LIBRARIES' in tgt.properies: - otherDeps += [x for x in tgt.properies['IMPORTED_LINK_DEPENDENT_LIBRARIES'] if x] + if 'IMPORTED_IMPLIB_{}'.format(cfg) in tgt.properties: + libraries += [x for x in tgt.properties['IMPORTED_IMPLIB_{}'.format(cfg)] if x] + elif 'IMPORTED_IMPLIB' in tgt.properties: + libraries += [x for x in tgt.properties['IMPORTED_IMPLIB'] if x] + elif 'IMPORTED_LOCATION_{}'.format(cfg) in tgt.properties: + libraries += [x for x in tgt.properties['IMPORTED_LOCATION_{}'.format(cfg)] if x] + elif 'IMPORTED_LOCATION' in tgt.properties: + libraries += [x for x in tgt.properties['IMPORTED_LOCATION'] if x] + + if 'INTERFACE_LINK_LIBRARIES' in tgt.properties: + otherDeps += [x for x in tgt.properties['INTERFACE_LINK_LIBRARIES'] if x] + + if 'IMPORTED_LINK_DEPENDENT_LIBRARIES_{}'.format(cfg) in tgt.properties: + otherDeps += [x for x in tgt.properties['IMPORTED_LINK_DEPENDENT_LIBRARIES_{}'.format(cfg)] if x] + elif 'IMPORTED_LINK_DEPENDENT_LIBRARIES' in tgt.properties: + otherDeps += [x for x in tgt.properties['IMPORTED_LINK_DEPENDENT_LIBRARIES'] if x] for j in otherDeps: if j in self.traceparser.targets: |