diff options
author | Oliver Schneider <oliver@assarbad.net> | 2013-03-10 05:58:03 +0400 |
---|---|---|
committer | Oliver Schneider <oliver@assarbad.net> | 2013-03-10 05:58:03 +0400 |
commit | 61720e026ffad007f17fef91157ee9872bb5fc79 (patch) | |
tree | 924b841b732aedbd6abc420b5d9f6b8bc75b73a8 | |
parent | 34ae33738da2c433869e6b815eb089c52761ec65 (diff) |
Implemented flags ATL and StaticATL to complement MFC and StaticRuntime flags ... perhaps an addition could be to make assumptions for ATL based on StaticRuntime as well, but in general these are distinct configuration settings
--HG--
branch : atl-support
-rw-r--r-- | src/actions/vstudio/vs200x_vcproj.lua | 3 | ||||
-rw-r--r-- | src/actions/vstudio/vs2010_vcxproj.lua | 4 | ||||
-rw-r--r-- | src/base/api.lua | 2 | ||||
-rw-r--r-- | tests/actions/vstudio/vc200x/test_mfc.lua | 36 |
4 files changed, 44 insertions, 1 deletions
diff --git a/src/actions/vstudio/vs200x_vcproj.lua b/src/actions/vstudio/vs200x_vcproj.lua index 2acf60b..fae5900 100644 --- a/src/actions/vstudio/vs200x_vcproj.lua +++ b/src/actions/vstudio/vs200x_vcproj.lua @@ -92,6 +92,9 @@ if (cfg.flags.MFC) then _p(3, 'UseOfMFC="%d"', iif(cfg.flags.StaticRuntime, 1, 2)) end + if (cfg.flags.ATL or cfg.flags.StaticATL) then + _p(3, 'UseOfATL="%d"', iif(cfg.flags.StaticATL, 1, 2)) + end _p(3,'CharacterSet="%s"', iif(cfg.flags.Unicode, 1, 2)) if cfg.flags.Managed then _p(3,'ManagedExtensions="1"') diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index 0b758d8..f78920e 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -83,6 +83,10 @@ _p(2,'<UseOfMfc>%s</UseOfMfc>', iif(cfg.flags.StaticRuntime, "Static", "Dynamic")) end + if cfg.flags.ATL or cfg.flags.StaticATL then + _p(2,'<UseOfAtl>%s</UseOfAtl>', iif(cfg.flags.StaticATL, "Static", "Dynamic")) + end + if cfg.flags.Managed then _p(2,'<CLRSupport>true</CLRSupport>') end diff --git a/src/base/api.lua b/src/base/api.lua index f28a83b..86e8fb2 100644 --- a/src/base/api.lua +++ b/src/base/api.lua @@ -94,6 +94,7 @@ allowed = function(value) local allowed_flags = { + ATL = 1, DebugEnvsDontMerge = 1, DebugEnvsInherit = 1, EnableSSE = 1, @@ -120,6 +121,7 @@ OptimizeSize = 1, OptimizeSpeed = 1, SEH = 1, + StaticATL = 1, StaticRuntime = 1, Symbols = 1, Unicode = 1, diff --git a/tests/actions/vstudio/vc200x/test_mfc.lua b/tests/actions/vstudio/vc200x/test_mfc.lua index ea0671e..cf0a54a 100644 --- a/tests/actions/vstudio/vc200x/test_mfc.lua +++ b/tests/actions/vstudio/vc200x/test_mfc.lua @@ -1,6 +1,6 @@ -- -- tests/actions/vstudio/vc200x/test_mfc.lua --- Validate MFC support in Visual Studio 200x C/C++ projects. +-- Validate ATL/MFC support in Visual Studio 200x C/C++ projects. -- Copyright (c) 2011 Jason Perkins and the Premake project -- @@ -62,3 +62,37 @@ > ]] end + +-- +-- Same as above for ATL. +-- + + function suite.useOfAtl_isDynamic_onSharedRuntime() + flags { "ATL" } + prepare() + test.capture [[ + <Configuration + Name="Debug|Win32" + OutputDirectory="." + IntermediateDirectory="obj\Debug" + ConfigurationType="1" + UseOfATL="2" + CharacterSet="2" + > + ]] + end + + function suite.useOfAtl_isStatic_onStaticRuntime() + flags { "StaticATL" } + prepare() + test.capture [[ + <Configuration + Name="Debug|Win32" + OutputDirectory="." + IntermediateDirectory="obj\Debug" + ConfigurationType="1" + UseOfATL="1" + CharacterSet="2" + > + ]] + end |