Skip to content

Commit 991f5e7

Browse files
authored
Merge pull request #54 from RolfKal/main
Clean up Visual Studio generator name from cmake <3.0 compatibiliy left overs
2 parents b91104d + 271cd64 commit 991f5e7

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

autobuild/autobuild_tool_source_environment.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,10 @@ def internal_source_environment(configurations, varsfile):
733733
# vswhere might have reported (e.g.) "158" or "161". Ignore
734734
# the minor version when choosing the CMake generator.
735735
AUTOBUILD_WIN_CMAKE_GEN = {
736-
'12': "Visual Studio 12",
737-
'14': "Visual Studio 14",
738-
'15': "Visual Studio 15",
739-
'16': "Visual Studio 16",
736+
'12': "Visual Studio 12 2013",
737+
'14': "Visual Studio 14 2015",
738+
'15': "Visual Studio 15 2017",
739+
'16': "Visual Studio 16 2019",
740740
'17': "Visual Studio 17 2022",
741741
}[vsver[:-1]]
742742
except KeyError:
@@ -747,11 +747,7 @@ def internal_source_environment(configurations, varsfile):
747747
# error here. Plus this way, we defer the error until we hit a
748748
# build that actually consumes AUTOBUILD_WIN_CMAKE_GEN.
749749
AUTOBUILD_WIN_CMAKE_GEN = "Visual Studio %s" % (vsver[:-1])
750-
# Of course CMake also needs to know bit width :-P
751-
# Or at least it used to, until VS 2019.
752-
if os.environ["AUTOBUILD_ADDRSIZE"] == "64" and vsver < '160':
753-
AUTOBUILD_WIN_CMAKE_GEN += " Win64"
754-
# cmake -G "$AUTOBUILD_WIN_CMAKE_GEN"
750+
755751
exports["AUTOBUILD_WIN_CMAKE_GEN"] = AUTOBUILD_WIN_CMAKE_GEN
756752

757753
try:

0 commit comments

Comments
 (0)