Skip to content

Commit ab56337

Browse files
committed
Deprecate MFC rather than completely remove.
1 parent 61901f9 commit ab56337

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

modules/vstudio/tests/vc2010/test_config_props.lua

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,17 @@
184184
]]
185185
end
186186

187+
function suite.useOfMfc_onDynamicRuntimeViaFlag()
188+
flags { "MFC" }
189+
prepare()
190+
test.capture [[
191+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
192+
<ConfigurationType>Application</ConfigurationType>
193+
<UseDebugLibraries>false</UseDebugLibraries>
194+
<UseOfMfc>Dynamic</UseOfMfc>
195+
]]
196+
end
197+
187198
function suite.useOfMfc_onStaticRuntime()
188199
mfc "On"
189200
staticruntime "On"
@@ -195,7 +206,19 @@
195206
<UseOfMfc>Static</UseOfMfc>
196207
]]
197208
end
198-
209+
210+
function suite.useOfMfc_onStaticRuntimeViaFlag()
211+
flags { "MFC" }
212+
staticruntime "On"
213+
prepare()
214+
test.capture [[
215+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
216+
<ConfigurationType>Application</ConfigurationType>
217+
<UseDebugLibraries>false</UseDebugLibraries>
218+
<UseOfMfc>Static</UseOfMfc>
219+
]]
220+
end
221+
199222
function suite.useOfMfc_forceStatic()
200223
mfc "Static"
201224
prepare()

src/_premake_init.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@
339339
"FatalLinkWarnings",
340340
"LinkTimeOptimization",
341341
"Maps",
342+
"MFC",
342343
"MultiProcessorCompile",
343344
"No64BitChecks",
344345
"NoCopyLocal",
@@ -1088,6 +1089,14 @@
10881089
tokens = true,
10891090
}
10901091

1092+
api.deprecateValue("flags", "MFC", 'Use `mfc` instead.',
1093+
function(value)
1094+
mfc("On")
1095+
end,
1096+
function(value)
1097+
mfc("Off")
1098+
end)
1099+
10911100
api.deprecateField("sysincludedirs", 'Use `externalincludedirs` instead.',
10921101
function(value)
10931102
externalincludedirs(value)

website/docs/flags.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ flags { "flag_list" }
1616
| FatalWarnings | Treat all warnings as errors; equivalent to FatalCompileWarnings, FatalLinkWarnings |
1717
| LinkTimeOptimization | Enable link-time (i.e. whole program) optimizations. |
1818
| Maps | Enable Generate Map File for Visual Studio |
19+
| MFC | Enable support for Microsoft Foundation Classes. Deprecated in Premake 5.0.0-beta4. |
1920
| MultiProcessorCompile | Enable Visual Studio to use multiple compiler processes when building. |
2021
| No64BitChecks | Disable 64-bit portability warnings. |
2122
| NoBufferSecurityCheck | Turn off stack protection checks. |

0 commit comments

Comments
 (0)