aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/ninjabackend.py1
-rw-r--r--mesonbuild/dependencies.py2
-rw-r--r--mesonbuild/environment.py1
-rw-r--r--mesonbuild/modules/pkgconfig.py2
-rw-r--r--mesonbuild/wrap/wrap.py1
-rwxr-xr-xrun_project_tests.py2
-rwxr-xr-xtools/cmake2meson.py1
7 files changed, 10 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 52a6f93..e9eb6bf 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -261,6 +261,7 @@ int dummy;
# because the syntax we use for unity builds is specific to C/++/ObjC/++.
# Assembly files cannot be unitified and neither can LLVM IR files
langs_cant_unity = ('d', 'fortran')
+
def get_target_source_can_unity(self, target, source):
if isinstance(source, File):
source = source.fname
diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py
index 1efebe9..9659ace 100644
--- a/mesonbuild/dependencies.py
+++ b/mesonbuild/dependencies.py
@@ -797,8 +797,10 @@ class GTestDependency(Dependency):
def get_link_args(self):
return self.link_args
+
def get_version(self):
return '1.something_maybe'
+
def get_sources(self):
return self.sources
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 64d9f8b..70074ed 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -326,6 +326,7 @@ class Environment():
if len(rest) == 2:
defines[rest[0]] = rest[1]
return defines
+
@staticmethod
def get_gnu_version_from_defines(defines):
dot = '.'
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index c558d48..e46c239 100644
--- a/mesonbuild/modules/pkgconfig.py
+++ b/mesonbuild/modules/pkgconfig.py
@@ -67,6 +67,7 @@ class PkgConfigModule(ExtensionModule):
'Requires.private: {}\n'.format(' '.join(priv_reqs)))
if len(conflicts) > 0:
ofile.write('Conflicts: {}\n'.format(' '.join(conflicts)))
+
def generate_libs_flags(libs):
msg = 'Library target {0!r} has {1!r} set. Compilers ' \
'may not find it from its \'-l{2}\' linker flag in the ' \
@@ -85,6 +86,7 @@ class PkgConfigModule(ExtensionModule):
if l.name_suffix_set:
mlog.warning(msg.format(l.name, 'name_suffix', lname, pcfile))
yield '-l%s' % lname
+
if len(libraries) > 0:
ofile.write('Libs: {}\n'.format(' '.join(generate_libs_flags(libraries))))
if len(priv_libs) > 0:
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index d812b4e..7acbc76 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -158,6 +158,7 @@ class Resolver:
subprocess.check_call(['git', 'remote', 'set-url',
'--push', 'origin', push_url],
cwd=checkoutdir)
+
def get_hg(self, p):
checkoutdir = os.path.join(self.subdir_root, p.get('directory'))
revno = p.get('revision')
diff --git a/run_project_tests.py b/run_project_tests.py
index 2834254..0496d4a 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -46,9 +46,11 @@ class TestResult:
class AutoDeletedDir():
def __init__(self, d):
self.dir = d
+
def __enter__(self):
os.makedirs(self.dir, exist_ok=True)
return self.dir
+
def __exit__(self, _type, value, traceback):
# On Windows, shutil.rmtree fails sometimes, because 'the directory is not empty'.
# Retrying fixes this.
diff --git a/tools/cmake2meson.py b/tools/cmake2meson.py
index 7d6d02a..b108cf5 100755
--- a/tools/cmake2meson.py
+++ b/tools/cmake2meson.py
@@ -136,6 +136,7 @@ class Converter:
ignored_funcs = {'cmake_minimum_required': True,
'enable_testing': True,
'include': True}
+
def __init__(self, cmake_root):
self.cmake_root = cmake_root
self.indent_unit = ' '