1
0
forked from 0ad/0ad

Added Testing configuration

This was SVN commit r820.
This commit is contained in:
Simon Brenner 2004-07-27 00:47:15 +00:00
parent 386900c0fc
commit 09df66f871

View File

@ -4,6 +4,7 @@ dofile("functions.lua")
project.name = "prometheus"
project.bindir = "../../../binaries/system"
project.libdir = "../../../binaries/system"
project.configs = { "Debug", "Release", "Testing" }
-- Start the package part
package = newpackage()
@ -16,6 +17,7 @@ package.language = "c++"
-- On Windows, ".exe" is added on the end, on unices the name is used directly
package.config["Debug"].target = "ps_dbg"
package.config["Release"].target = "ps"
package.config["Testing"].target = "ps_test"
-- Files
package.files = {
@ -67,34 +69,53 @@ package.includepaths = {
package.libpaths = {
}
package.buildflags = { "no-rtti" }
package.config["Testing"].buildflags = { "with-symbols" }
package.config["Testing"].defines = { "TESTING" }
package.config["Release"].defines = { "NDEBUG" }
-- Docs says that premake does this automatically - it doesn't (at least not for
-- GCC/Linux)
package.config["Debug"].buildflags = { "with-symbols" }
-- Platform Specifics
if (OS == "windows") then
-- Libraries
package.links = { "opengl32" }
-- package.defines = { "XERCES_STATIC_LIB" }
package.config["Release"].defines = { "NDEBUG" }
tinsert(package.files, sourcesfromdirs("../../lib/sysdep/win"))
tinsert(package.files, {"../../lib/sysdep/win/assert_dlg.rc"})
package.linkoptions = { "/ENTRY:entry",
"/DELAYLOAD:opengl32.dll",
"/DELAYLOAD:advapi32.dll",
"/DELAYLOAD:gdi32.dll",
"/DELAYLOAD:user32.dll",
"/DELAYLOAD:ws2_32.dll",
"/DELAYLOAD:version.dll",
"/DELAYLOAD:ddraw.dll",
"/DELAYLOAD:libpng10.dll",
"/DELAYLOAD:zlib1.dll",
"/DELAYLOAD:glu32.dll",
"/DELAY:UNLOAD" -- allow manual unload of delay-loaded DLLs
}
"/DELAYLOAD:opengl32.dll",
"/DELAYLOAD:advapi32.dll",
"/DELAYLOAD:gdi32.dll",
"/DELAYLOAD:user32.dll",
"/DELAYLOAD:ws2_32.dll",
"/DELAYLOAD:version.dll",
"/DELAYLOAD:ddraw.dll",
"/DELAYLOAD:libpng10.dll",
"/DELAYLOAD:zlib1.dll",
"/DELAYLOAD:glu32.dll",
"/DELAY:UNLOAD" -- allow manual unload of delay-loaded DLLs
}
package.config["Debug"].linkoptions = {
"/DELAYLOAD:js32d.dll",
}
"/DELAYLOAD:js32d.dll",
}
-- Testing uses Debug DLL's
package.config["Testing"].linkoptions = package.config["Debug"].linkoptions
package.config["Release"].linkoptions = {
"/DELAYLOAD:js32.dll",
}
package.buildflags = { "no-main" }
"/DELAYLOAD:js32.dll",
}
tinsert(package.buildflags, { "no-main" })
package.config["Testing"].buildoptions = {
"/Zi"
}
package.pchHeader = "precompiled.h"
package.pchSource = "precompiled.cpp"
else -- Non-Windows, = Unix
@ -116,7 +137,4 @@ else -- Non-Windows, = Unix
"__STDC_VERSION__=199901L" }
-- Includes
tinsert(package.includepaths, { "/usr/X11R6/include/X11" } )
-- Build Flags
package.config["Debug"].buildoptions = { "-ggdb" }
end