Browse Source

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 !
pull/789/head
realvictorprm 8 years ago
parent
commit
1662f5108f
  1. 11
      build/GenerateProjects.bat
  2. 15
      build/Helpers.lua
  3. 2
      build/scripts/LLVM.lua

11
build/GenerateProjects.bat

@ -8,12 +8,15 @@ echo [0] Clean
echo [1] Visual C++ 2012 echo [1] Visual C++ 2012
echo [2] Visual C++ 2013 echo [2] Visual C++ 2013
echo [3] Visual C++ 2015 echo [3] Visual C++ 2015
echo [4] GNU Make echo [4] Visual C++ 2017
echo [5] GNU Make
echo. echo.
:choice :choice
set /P C="Choice: " set /P C="Choice: "
if "%C%"=="4" goto gmake if "%C%"=="5" goto gmake
if "%C%"=="4" goto vs2017
if "%C%"=="3" goto vs2015 if "%C%"=="3" goto vs2015
if "%C%"=="2" goto vs2013 if "%C%"=="2" goto vs2013
if "%C%"=="1" goto vs2012 if "%C%"=="1" goto vs2012
@ -35,6 +38,10 @@ goto quit
"premake5" --file=premake5.lua vs2015 "premake5" --file=premake5.lua vs2015
goto quit goto quit
:vs2017
"premake5" --file=premake5.lua vs2017
goto quit
:gmake :gmake
"premake5" --file=premake5.lua gmake "premake5" --file=premake5.lua gmake
goto quit goto quit

15
build/Helpers.lua

@ -75,12 +75,17 @@ function SetupManagedProject()
configuration(c) configuration(c)
end end
if action == "vs2015" then if action == "vs2017" then
configuration "vs2015" configuration "vs2017"
framework "4.6" framework "4.6"
end elseif action == "vs2015" then
configuration "vs2015"
framework "4.6"
end
configuration "vs2013" configuration "vs2013"
framework "4.5" framework "4.5"

2
build/scripts/LLVM.lua

@ -62,7 +62,7 @@ function get_toolset_configuration_name()
if not string.starts(vsver, "vs") then if not string.starts(vsver, "vs") then
local out = outputof("cl") local out = outputof("cl")
local ver, arch = string.match(out, '(%d+).%d+.%d+.?%d*%s+%w*%s+(%w+)') local ver, arch = string.match(out, '(%d+).%d+.%d+.?%d*%s+')
vsver = get_vs_version(ver) vsver = get_vs_version(ver)
end end

Loading…
Cancel
Save