Skip to content

Commit 1662f51

Browse files
committed
Added support for VS 2017 project generation
Fixed also the regex for finding ms build tools. It's required to open the batch files with the developer command prompt of vs 2017 !
1 parent 358c03e commit 1662f51

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

build/GenerateProjects.bat

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ echo [0] Clean
88
echo [1] Visual C++ 2012
99
echo [2] Visual C++ 2013
1010
echo [3] Visual C++ 2015
11-
echo [4] GNU Make
11+
echo [4] Visual C++ 2017
12+
echo [5] GNU Make
13+
1214
echo.
1315

1416
:choice
1517
set /P C="Choice: "
16-
if "%C%"=="4" goto gmake
18+
if "%C%"=="5" goto gmake
19+
if "%C%"=="4" goto vs2017
1720
if "%C%"=="3" goto vs2015
1821
if "%C%"=="2" goto vs2013
1922
if "%C%"=="1" goto vs2012
@@ -35,6 +38,10 @@ goto quit
3538
"premake5" --file=premake5.lua vs2015
3639
goto quit
3740

41+
:vs2017
42+
"premake5" --file=premake5.lua vs2017
43+
goto quit
44+
3845
:gmake
3946
"premake5" --file=premake5.lua gmake
4047
goto quit

build/Helpers.lua

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,17 @@ function SetupManagedProject()
7575
configuration(c)
7676
end
7777

78-
if action == "vs2015" then
78+
if action == "vs2017" then
7979

80-
configuration "vs2015"
81-
framework "4.6"
82-
83-
end
80+
configuration "vs2017"
81+
framework "4.6"
82+
83+
elseif action == "vs2015" then
84+
85+
configuration "vs2015"
86+
framework "4.6"
87+
88+
end
8489

8590
configuration "vs2013"
8691
framework "4.5"

build/scripts/LLVM.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function get_toolset_configuration_name()
6262

6363
if not string.starts(vsver, "vs") then
6464
local out = outputof("cl")
65-
local ver, arch = string.match(out, '(%d+).%d+.%d+.?%d*%s+%w*%s+(%w+)')
65+
local ver, arch = string.match(out, '(%d+).%d+.%d+.?%d*%s+')
6666
vsver = get_vs_version(ver)
6767
end
6868

0 commit comments

Comments
 (0)