Skip to content

Commit 6f0cb4a

Browse files
authored
Merge pull request premake#2331 from nickclark2016/feature/remove-deprecated-flags-with-existing-replacements
Remove Deprecated Flags with Replacements, Fix Tests
2 parents f1e2014 + e1f3cf2 commit 6f0cb4a

File tree

9 files changed

+50
-249
lines changed

9 files changed

+50
-249
lines changed

modules/vstudio/tests/vc2010/test_compile_settings.lua

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@
645645
--
646646

647647
function suite.wchar_onNative()
648-
flags "NativeWChar"
648+
nativewchar "On"
649649
prepare()
650650
test.capture [[
651651
<ClCompile>
@@ -657,7 +657,7 @@
657657
end
658658

659659
function suite.wchar_onNoNative()
660-
flags "NoNativeWChar"
660+
nativewchar "Off"
661661
prepare()
662662
test.capture [[
663663
<ClCompile>
@@ -1636,19 +1636,6 @@
16361636
]]
16371637
end
16381638

1639-
function suite.omitFramePointer_DeprecationFlag()
1640-
flags "NoFramePointer"
1641-
prepare()
1642-
test.capture [[
1643-
<ClCompile>
1644-
<PrecompiledHeader>NotUsing</PrecompiledHeader>
1645-
<WarningLevel>Level3</WarningLevel>
1646-
<Optimization>Disabled</Optimization>
1647-
<OmitFramePointers>true</OmitFramePointers>
1648-
</ClCompile>
1649-
]]
1650-
end
1651-
16521639
--
16531640
-- If useFullPaths flag is set, add <UseFullPaths> element
16541641
--

modules/xcode/tests/test_xcode_project.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,7 @@
23182318

23192319

23202320
function suite.XCBuildConfigurationProject_OnStaticRuntime()
2321-
flags { "StaticRuntime" }
2321+
staticruntime "On"
23222322
prepare()
23232323
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
23242324
test.capture [[
@@ -2725,7 +2725,7 @@
27252725

27262726

27272727
function suite.XCBuildConfigurationProject_OnFloatFast()
2728-
flags { "FloatFast" }
2728+
floatingpoint "Fast"
27292729
prepare()
27302730
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
27312731
test.capture [[
@@ -2858,7 +2858,7 @@
28582858

28592859

28602860
function suite.XCBuildConfigurationProject_OnNoFramePointer()
2861-
flags { "NoFramePointer" }
2861+
omitframepointer "On"
28622862
prepare()
28632863
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
28642864
test.capture [[

modules/xcode/xcode_common.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@
15941594

15951595
settings['OTHER_LDFLAGS'] = table.join(flags, cfg.linkoptions)
15961596

1597-
if cfg.flags.StaticRuntime then
1597+
if cfg.staticruntime == "On" then
15981598
settings['STANDARD_C_PLUS_PLUS_LIBRARY_TYPE'] = 'static'
15991599
end
16001600

premake5.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188

189189
filter "configurations:Debug"
190190
defines "_DEBUG"
191-
flags { "Symbols" }
191+
symbols "On"
192192

193193
filter "configurations:Release"
194194
defines "NDEBUG"

src/_premake_init.lua

Lines changed: 0 additions & 194 deletions
Original file line numberDiff line numberDiff line change
@@ -332,55 +332,33 @@
332332
scope = "config",
333333
kind = "list:string",
334334
allowed = {
335-
"Component", -- DEPRECATED
336335
"DebugEnvsDontMerge",
337336
"DebugEnvsInherit",
338-
"EnableSSE", -- DEPRECATED
339-
"EnableSSE2", -- DEPRECATED
340337
"ExcludeFromBuild",
341-
"ExtraWarnings", -- DEPRECATED
342338
"FatalCompileWarnings",
343339
"FatalLinkWarnings",
344-
"FloatFast", -- DEPRECATED
345-
"FloatStrict", -- DEPRECATED
346340
"LinkTimeOptimization",
347-
"Managed", -- DEPRECATED
348341
"Maps",
349342
"MFC",
350343
"MultiProcessorCompile",
351-
"NativeWChar", -- DEPRECATED
352344
"No64BitChecks",
353345
"NoCopyLocal",
354-
"NoEditAndContinue", -- DEPRECATED
355-
"NoFramePointer", -- DEPRECATED
356346
"NoImplicitLink",
357347
"NoImportLib", -- DEPRECATED
358348
"NoIncrementalLink",
359349
"NoManifest",
360350
"NoMinimalRebuild",
361-
"NoNativeWChar", -- DEPRECATED
362351
"NoPCH",
363352
"NoRuntimeChecks",
364353
"NoBufferSecurityCheck",
365-
"NoWarnings", -- DEPRECATED
366354
"OmitDefaultLibrary",
367-
"Optimize", -- DEPRECATED
368-
"OptimizeSize", -- DEPRECATED
369-
"OptimizeSpeed", -- DEPRECATED
370355
"RelativeLinks",
371-
"ReleaseRuntime", -- DEPRECATED
372356
"ShadowedVariables",
373-
"StaticRuntime", -- DEPRECATED
374-
"Symbols", -- DEPRECATED
375357
"UndefinedIdentifiers",
376-
"WinMain", -- DEPRECATED
377358
"WPF",
378359
},
379360
aliases = {
380361
FatalWarnings = { "FatalWarnings", "FatalCompileWarnings", "FatalLinkWarnings" },
381-
Optimise = 'Optimize',
382-
OptimiseSize = 'OptimizeSize',
383-
OptimiseSpeed = 'OptimizeSpeed',
384362
},
385363
}
386364

@@ -1148,178 +1126,6 @@
11481126
buildoutputs(value.outputs)
11491127
end)
11501128

1151-
1152-
api.deprecateValue("flags", "Component", 'Use `buildaction "Component"` instead.',
1153-
function(value)
1154-
buildaction "Component"
1155-
end)
1156-
1157-
1158-
api.deprecateValue("flags", "EnableSSE", 'Use `vectorextensions "SSE"` instead.',
1159-
function(value)
1160-
vectorextensions("SSE")
1161-
end,
1162-
function(value)
1163-
vectorextensions "Default"
1164-
end)
1165-
1166-
1167-
api.deprecateValue("flags", "EnableSSE2", 'Use `vectorextensions "SSE2"` instead.',
1168-
function(value)
1169-
vectorextensions("SSE2")
1170-
end,
1171-
function(value)
1172-
vectorextensions "Default"
1173-
end)
1174-
1175-
1176-
api.deprecateValue("flags", "FloatFast", 'Use `floatingpoint "Fast"` instead.',
1177-
function(value)
1178-
floatingpoint("Fast")
1179-
end,
1180-
function(value)
1181-
floatingpoint "Default"
1182-
end)
1183-
1184-
1185-
api.deprecateValue("flags", "FloatStrict", 'Use `floatingpoint "Strict"` instead.',
1186-
function(value)
1187-
floatingpoint("Strict")
1188-
end,
1189-
function(value)
1190-
floatingpoint "Default"
1191-
end)
1192-
1193-
1194-
api.deprecateValue("flags", "NativeWChar", 'Use `nativewchar "On"` instead."',
1195-
function(value)
1196-
nativewchar("On")
1197-
end,
1198-
function(value)
1199-
nativewchar "Default"
1200-
end)
1201-
1202-
1203-
api.deprecateValue("flags", "NoNativeWChar", 'Use `nativewchar "Off"` instead."',
1204-
function(value)
1205-
nativewchar("Off")
1206-
end,
1207-
function(value)
1208-
nativewchar "Default"
1209-
end)
1210-
1211-
1212-
api.deprecateValue("flags", "Optimize", 'Use `optimize "On"` instead.',
1213-
function(value)
1214-
optimize ("On")
1215-
end,
1216-
function(value)
1217-
optimize "Off"
1218-
end)
1219-
1220-
1221-
api.deprecateValue("flags", "OptimizeSize", 'Use `optimize "Size"` instead.',
1222-
function(value)
1223-
optimize ("Size")
1224-
end,
1225-
function(value)
1226-
optimize "Off"
1227-
end)
1228-
1229-
1230-
api.deprecateValue("flags", "OptimizeSpeed", 'Use `optimize "Speed"` instead.',
1231-
function(value)
1232-
optimize ("Speed")
1233-
end,
1234-
function(value)
1235-
optimize "Off"
1236-
end)
1237-
1238-
1239-
api.deprecateValue("flags", "ReleaseRuntime", 'Use `runtime "Release"` instead.',
1240-
function(value)
1241-
runtime "Release"
1242-
end,
1243-
function(value)
1244-
end)
1245-
1246-
1247-
api.deprecateValue("flags", "ExtraWarnings", 'Use `warnings "Extra"` instead.',
1248-
function(value)
1249-
warnings "Extra"
1250-
end,
1251-
function(value)
1252-
warnings "Default"
1253-
end)
1254-
1255-
1256-
api.deprecateValue("flags", "NoWarnings", 'Use `warnings "Off"` instead.',
1257-
function(value)
1258-
warnings "Off"
1259-
end,
1260-
function(value)
1261-
warnings "Default"
1262-
end)
1263-
1264-
api.deprecateValue("flags", "Managed", 'Use `clr "On"` instead.',
1265-
function(value)
1266-
clr "On"
1267-
end,
1268-
function(value)
1269-
clr "Off"
1270-
end)
1271-
1272-
1273-
api.deprecateValue("flags", "NoEditAndContinue", 'Use editandcontinue "Off"` instead.',
1274-
function(value)
1275-
editandcontinue "Off"
1276-
end,
1277-
function(value)
1278-
editandcontinue "On"
1279-
end)
1280-
1281-
1282-
-- 21 June 2016
1283-
1284-
api.deprecateValue("flags", "Symbols", 'Use `symbols "On"` instead',
1285-
function(value)
1286-
symbols "On"
1287-
end,
1288-
function(value)
1289-
symbols "Default"
1290-
end)
1291-
1292-
1293-
-- 13 April 2017
1294-
1295-
api.deprecateValue("flags", "WinMain", 'Use `entrypoint "WinMainCRTStartup"` instead',
1296-
function(value)
1297-
entrypoint "WinMainCRTStartup"
1298-
end,
1299-
function(value)
1300-
entrypoint "mainCRTStartup"
1301-
end)
1302-
1303-
-- 31 October 2017
1304-
1305-
api.deprecateValue("flags", "StaticRuntime", 'Use `staticruntime "On"` instead',
1306-
function(value)
1307-
staticruntime "On"
1308-
end,
1309-
function(value)
1310-
staticruntime "Default"
1311-
end)
1312-
1313-
-- 08 April 2018
1314-
1315-
api.deprecateValue("flags", "NoFramePointer", 'Use `omitframepointer "On"` instead.',
1316-
function(value)
1317-
omitframepointer("On")
1318-
end,
1319-
function(value)
1320-
omitframepointer("Default")
1321-
end)
1322-
13231129
-----------------------------------------------------------------------------
13241130
--
13251131
-- Install Premake's default set of command line arguments.

0 commit comments

Comments
 (0)