Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Perkins <starkos@industriousone.com>2013-03-10 18:03:35 +0400
committerJason Perkins <starkos@industriousone.com>2013-03-10 18:03:35 +0400
commitbb926fad02ea924028cf65b64e1100a0d9d90e2d (patch)
tree9acf71b3e1a2ad939bcb9f6bd871ef35c7b51690
parent6721b55a1abfc41a9f5f3909f2f234e9d2066acf (diff)
parent61720e026ffad007f17fef91157ee9872bb5fc79 (diff)
Merged in assarbad/premake-stable/atl-support (pull request #10)
Two new flags to complement MFC support with ATL support
-rw-r--r--src/actions/vstudio/vs200x_vcproj.lua3
-rw-r--r--src/actions/vstudio/vs2010_vcxproj.lua4
-rw-r--r--src/base/api.lua2
-rw-r--r--tests/actions/vstudio/vc200x/test_mfc.lua36
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