aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonmain.py
diff options
context:
space:
mode:
authorNicolas Schneider <nioncode+git@gmail.com>2017-03-23 10:34:32 +0100
committerNicolas Schneider <nioncode+git@gmail.com>2017-03-23 10:34:32 +0100
commit92ed60729070c5b94c34ab24b1553d40978b645d (patch)
treeae1cba87e82446ae3b143b85da63ad59041fcbcf /mesonbuild/mesonmain.py
parent776de065a8e1bfe94938d535bdf06c1cad9dc28b (diff)
downloadmeson-92ed60729070c5b94c34ab24b1553d40978b645d.zip
meson-92ed60729070c5b94c34ab24b1553d40978b645d.tar.gz
meson-92ed60729070c5b94c34ab24b1553d40978b645d.tar.bz2
add 'vs' backend that automatically chooses between the vs backends
For newer VS versions, we can simply rely on 'VisualStudioVersion' being set in the environment. For VS2010, we fall back to check 'VSINSTALLDIR' for the version string. If the backend can not be auto detected, we raise an exception to make the user choose an explicit backend. We also print the detected backend to the meson log.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r--mesonbuild/mesonmain.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index 38c00a0..7db6310 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -145,6 +145,10 @@ If you want to change option values, use the mesonconf tool instead.'''
if self.options.backend == 'ninja':
from .backend import ninjabackend
g = ninjabackend.NinjaBackend(b)
+ elif self.options.backend == 'vs':
+ from .backend import vs2010backend
+ g = vs2010backend.autodetect_vs_version(b)
+ mlog.log('Auto detected Visual Studio backend:', mlog.bold(g.name))
elif self.options.backend == 'vs2010':
from .backend import vs2010backend
g = vs2010backend.Vs2010Backend(b)