diff --git a/src/_premake_init.lua b/src/_premake_init.lua index eb8ec09e..89831bc6 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua @@ -285,6 +285,17 @@ }, } + api.register { + name = "ATL", + scope = "config", + kind = "string", + allowed = { + "Off", + "Dynamic", + "Static", + }, + } + api.register { name = "floatingpoint", scope = "config", diff --git a/src/actions/vstudio/vs200x_vcproj.lua b/src/actions/vstudio/vs200x_vcproj.lua index 5345aa84..14432cdd 100644 --- a/src/actions/vstudio/vs200x_vcproj.lua +++ b/src/actions/vstudio/vs200x_vcproj.lua @@ -146,7 +146,7 @@ m.configurationType, m.useOfMFC, m.characterSet, - m.managedExtensions + m.managedExtensions, } end end @@ -1551,7 +1551,6 @@ end - function m.usePrecompiledHeader(cfg) local prj, file = config.normalize(cfg) if file then diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index b3161f37..ad5bc897 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -177,6 +177,7 @@ "configurationType", "useDebugLibraries", "useOfMfc", + "useOfAtl", "clrSupport", "characterSet", "wholeProgramOptimization", @@ -1248,6 +1249,12 @@ end end + function vc2010.useOfAtl(cfg) + if cfg.ATL then + _p(2,'%s', cfg.ATL or "nil") + end + end + function vc2010.warningLevel(cfg) local map = { Off = "TurnOffAllWarnings", Extra = "Level4" } diff --git a/tests/actions/vstudio/vc2010/test_config_props.lua b/tests/actions/vstudio/vc2010/test_config_props.lua index 2286368c..3a6eaf76 100755 --- a/tests/actions/vstudio/vc2010/test_config_props.lua +++ b/tests/actions/vstudio/vc2010/test_config_props.lua @@ -151,6 +151,31 @@ ]] end +-- +-- Check the support for building with ATL. +-- + + function suite.useOfAtl_onDynamicRuntime() + ATL "Dynamic" + prepare() + test.capture [[ + + Application + false + Dynamic + ]] + end + + function suite.useOfAtl_onStaticRuntime() + ATL "Static" + prepare() + test.capture [[ + + Application + false + Static + ]] + end -- -- Check handling of the ReleaseRuntime flag; should override the