Browse Source

Added a new option to the build to choose between parsers.

pull/146/merge
triton 12 years ago
parent
commit
7f682e41c8
  1. 14
      build/GenerateProjects.bat
  2. 10
      build/premake4.lua

14
build/GenerateProjects.bat

@ -7,14 +7,16 @@ echo.
echo [0] Clean echo [0] Clean
echo [1] Visual C++ 2010 echo [1] Visual C++ 2010
echo [2] Visual C++ 2012 echo [2] Visual C++ 2012
echo [3] Visual C++ 2013 echo [3] Visual C++ 2012 (C++ parser)
echo [4] GNU Make echo [4] Visual C++ 2013
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%"=="3" goto vs2013 if "%C%"=="4" goto vs2013
if "%C%"=="3" goto vs2012_cpp
if "%C%"=="2" goto vs2012 if "%C%"=="2" goto vs2012
if "%C%"=="1" goto vs2010 if "%C%"=="1" goto vs2010
if "%C%"=="0" goto clean if "%C%"=="0" goto clean
@ -31,6 +33,10 @@ goto quit
"premake5" --file=premake4.lua vs2012 "premake5" --file=premake4.lua vs2012
goto quit goto quit
:vs2012_cpp
"premake5" --file=premake4.lua --parser=cpp vs2012
goto quit
:vs2013 :vs2013
"premake5" --file=premake4.lua vs2013 "premake5" --file=premake4.lua vs2013
goto quit goto quit

10
build/premake4.lua

@ -10,6 +10,16 @@ dofile "Tests.lua"
-- Setup the LLVM dependency -- Setup the LLVM dependency
dofile "LLVM.lua" dofile "LLVM.lua"
newoption {
trigger = "parser",
description = "Controls which version of the parser is enabled.",
value = "version",
allowed = {
{ "cpp", "Cross-platform C++ parser."},
{ "cli", "VS-only C++/CLI parser."},
}
}
function SetupParser() function SetupParser()
local c = configuration "vs*" local c = configuration "vs*"
defines { "OLD_PARSER" } defines { "OLD_PARSER" }

Loading…
Cancel
Save