From 7f682e41c8a2e83546e080c4611c97ab9aba4ed3 Mon Sep 17 00:00:00 2001 From: triton Date: Thu, 2 Jan 2014 14:13:47 +0000 Subject: [PATCH] Added a new option to the build to choose between parsers. --- build/GenerateProjects.bat | 14 ++++++++++---- build/premake4.lua | 10 ++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/build/GenerateProjects.bat b/build/GenerateProjects.bat index d479d5c0..1e8fd3d3 100644 --- a/build/GenerateProjects.bat +++ b/build/GenerateProjects.bat @@ -7,14 +7,16 @@ echo. echo [0] Clean echo [1] Visual C++ 2010 echo [2] Visual C++ 2012 -echo [3] Visual C++ 2013 -echo [4] GNU Make +echo [3] Visual C++ 2012 (C++ parser) +echo [4] Visual C++ 2013 +echo [5] GNU Make echo. :choice set /P C="Choice: " -if "%C%"=="4" goto gmake -if "%C%"=="3" goto vs2013 +if "%C%"=="5" goto gmake +if "%C%"=="4" goto vs2013 +if "%C%"=="3" goto vs2012_cpp if "%C%"=="2" goto vs2012 if "%C%"=="1" goto vs2010 if "%C%"=="0" goto clean @@ -31,6 +33,10 @@ goto quit "premake5" --file=premake4.lua vs2012 goto quit +:vs2012_cpp +"premake5" --file=premake4.lua --parser=cpp vs2012 +goto quit + :vs2013 "premake5" --file=premake4.lua vs2013 goto quit diff --git a/build/premake4.lua b/build/premake4.lua index 5a0e6588..e0d13b97 100644 --- a/build/premake4.lua +++ b/build/premake4.lua @@ -10,6 +10,16 @@ dofile "Tests.lua" -- Setup the LLVM dependency 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() local c = configuration "vs*" defines { "OLD_PARSER" }