Bug 1260299 - Generate Visual Studio project files corresponding to current toolchain; r?chmanchester
If we're running VS2013, we generate VS2013 files. If we're running VS2015,
we generate VS2015 files. If we don't have a Visual Studio version
defined, refuse to generate project files (hopefully this doesn't
happen in the real world but I'm sure someone will complain if it does).
MozReview-Commit-ID: 5GdsbGmWPLB
--- a/python/mozbuild/mozbuild/backend/visualstudio.py
+++ b/python/mozbuild/mozbuild/backend/visualstudio.py
@@ -69,18 +69,20 @@ class VisualStudioBackend(CommonBackend)
"""
def _init(self):
CommonBackend._init(self)
# These should eventually evolve into parameters.
self._out_dir = os.path.join(self.environment.topobjdir, 'msvc')
self._projsubdir = 'projects'
- # But making this one a parameter requires testing first.
- self._version = '2013'
+
+ self._version = self.environment.substs.get('MSVS_VERSION', None)
+ if not self._version:
+ raise Exception('MSVS_VERSION not defined; this should never happen')
self._paths_to_sources = {}
self._paths_to_includes = {}
self._paths_to_defines = {}
self._paths_to_configs = {}
self._libs_to_paths = {}
self._progs_to_paths = {}