aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/ninjabackend.py1
-rw-r--r--mesonbuild/backend/vs2010backend.py1
-rw-r--r--mesonbuild/backend/vs2015backend.py1
-rw-r--r--mesonbuild/backend/xcodebackend.py1
-rw-r--r--mesonbuild/interpreter.py4
-rw-r--r--test cases/common/125 shared module/meson.build4
6 files changed, 12 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index e5c430e..4792e96 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -139,6 +139,7 @@ class NinjaBackend(backends.Backend):
def __init__(self, build):
super().__init__(build)
+ self.name = 'ninja'
self.ninja_filename = 'build.ninja'
self.fortran_deps = {}
self.all_outputs = {}
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 5be780c..eb62bd1 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -58,6 +58,7 @@ class RegenInfo():
class Vs2010Backend(backends.Backend):
def __init__(self, build):
super().__init__(build)
+ self.name = 'vs2010'
self.project_file_version = '10.0.30319.1'
self.sources_conflicts = {}
self.platform_toolset = None
diff --git a/mesonbuild/backend/vs2015backend.py b/mesonbuild/backend/vs2015backend.py
index 8d4ff45..2c0efa7 100644
--- a/mesonbuild/backend/vs2015backend.py
+++ b/mesonbuild/backend/vs2015backend.py
@@ -19,6 +19,7 @@ from .vs2010backend import Vs2010Backend
class Vs2015Backend(Vs2010Backend):
def __init__(self, build):
super().__init__(build)
+ self.name = 'vs2015'
self.platform_toolset = 'v140'
self.vs_version = '2015'
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py
index b157741..8133e0f 100644
--- a/mesonbuild/backend/xcodebackend.py
+++ b/mesonbuild/backend/xcodebackend.py
@@ -22,6 +22,7 @@ from ..mesonlib import MesonException
class XCodeBackend(backends.Backend):
def __init__(self, build):
super().__init__(build)
+ self.name = 'xcode'
self.project_uid = self.environment.coredata.guid.replace('-', '')[:24]
self.project_conflist = self.gen_id()
self.indent = ' '
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index fefc1ff..502caff 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -1027,6 +1027,7 @@ class MesonMain(InterpreterObject):
'version': self.version_method,
'project_name' : self.project_name_method,
'get_cross_property': self.get_cross_property_method,
+ 'backend' : self.backend_method,
})
def add_install_script_method(self, args, kwargs):
@@ -1065,6 +1066,9 @@ class MesonMain(InterpreterObject):
return src
return os.path.join(src, sub)
+ def backend_method(self, args, kwargs):
+ return self.interpreter.backend.name
+
def source_root_method(self, args, kwargs):
return self.interpreter.environment.source_dir
diff --git a/test cases/common/125 shared module/meson.build b/test cases/common/125 shared module/meson.build
index 6fd21c2..ccb9c1a 100644
--- a/test cases/common/125 shared module/meson.build
+++ b/test cases/common/125 shared module/meson.build
@@ -1,5 +1,9 @@
project('shared module', 'c')
+if meson.backend().startswith('vs')
+ error('MESON_SKIP_TEST for some reason /FORCE does not work in the VS backend.')
+endif
+
dl = meson.get_compiler('c').find_library('dl', required : false)
l = shared_library('runtime', 'runtime.c')
# Do NOT link the module with the runtime library. This