Split into real Debug and Release configurations and add some more flags.

- Release now uses all optimizations.
- Compiler warnings as errors.
- Link-time optimization.
- Static runtime linking.
- Ignore 64-bit unportability.
- Map Normal -> Debug for compatiblity with humans who are too lazy to migrate.
This commit is contained in:
/dev/urandom 2016-01-04 02:12:05 +01:00
parent 515ec5bb2a
commit 9f20b3cd99
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

View File

@ -1,3 +1,4 @@
-- Option to allow copying the DLL file to a custom folder after build -- Option to allow copying the DLL file to a custom folder after build
newoption { newoption {
trigger = "copy-to", trigger = "copy-to",
@ -48,7 +49,7 @@ newaction {
solution "iw4x" solution "iw4x"
location ("./build") location ("./build")
configurations { "Normal", "Debug", "Release" } configurations { "Normal", "Debug", "DebugStatic", "Release", "ReleaseStatic" }
project "iw4x" project "iw4x"
kind "SharedLib" kind "SharedLib"
@ -57,8 +58,7 @@ solution "iw4x"
includedirs { "%{prj.location}" } includedirs { "%{prj.location}" }
architecture "x32" architecture "x32"
configmap { configmap {
["Debug"] = "Normal", ["Normal"] = "Debug"
["Release"] = "Normal"
} }
-- Allow newer Microsoft toolsets but fall back to VS2013 -- Allow newer Microsoft toolsets but fall back to VS2013
@ -68,10 +68,25 @@ solution "iw4x"
toolset "msc-120" toolset "msc-120"
end end
configuration "Normal" configuration "Debug"
defines { "DEBUG" }
flags { "MultiProcessorCompile", "Symbols", "UndefinedIndentifiers", "No64BitChecks" }
optimize "Debug"
configuration "DebugStatic"
defines { "NDEBUG" } defines { "NDEBUG" }
flags { "MultiProcessorCompile", "Symbols" } flags { "MultiProcessorCompile", "Symbols", "UndefinedIndentifiers", "StaticRuntime", "No64BitChecks" }
optimize "on" optimize "Debug"
configuration "Release"
defines { "NDEBUG" }
flags { "MultiProcessorCompile", "Symbols", "UndefinedIndentifiers", "LinkTimeOptimization", "No64BitChecks" }
optimize "Full"
configuration "ReleaseStatic"
defines { "NDEBUG" }
flags { "MultiProcessorCompile", "Symbols", "UndefinedIndentifiers", "LinkTimeOptimization", "StaticRuntime", "No64BitChecks" }
optimize "Full"
if not _OPTIONS["no-new-structure"] then if not _OPTIONS["no-new-structure"] then
vpaths { vpaths {