HelloAurora/AuroraSolution.lua
2022-04-01 05:14:58 +01:00

254 lines
5.8 KiB
Lua

newoption {
trigger = "with-wxWidgets",
description = "enable wxWidgets console + tests"
}
newoption {
trigger = "with-v8",
description = "enable v8 tests"
}
newoption {
trigger = "lite",
description = ""
}
auStartSolution({name = "Hello Aurora"})
local kNamespaceStlEx = "Vendor - 1 - STLEX"
local kNamespaceCompression = "Vendor - 2 - COMPRESSION"
local kNamespaceFormats = "Vendor - 3 - FORMATS"
local kNamespaceRtSupport = "Vendor - 4 - RUNTIME SUPPORT"
local kNamespaceCrypto = "Vendor - 5 - CRYPTO"
local kNamespaceJS = "Vendor - 6 - JAVASCRIPT"
local kNamespaceGraphics = "Vendor - 7 - GRAPHICS"
local kNamespaceAudio = "Vendor - 8 - AUDIO"
if (_OPTIONS["with-wxWidgets"]) then
auAddVisit({
namespace = kNamespaceGraphics,
name = "wxwidgets",
path = "Vendor/wxwidgets",
type = "SharedLib",
out = "!"
})
end
auAddVisit({
namespace = kNamespaceStlEx,
name = "uuid",
path = "Vendor/stduuid",
type = "StaticLib"
})
auAddVisit({
namespace = kNamespaceCompression,
name = "zstd",
path = "Vendor/zstd",
type = "StaticLib"
})
auAddVisit({
namespace = kNamespaceCompression,
name = "zlib",
path = "Vendor/zlib",
type = "StaticLib"
})
if (not _OPTIONS["lite"]) then
auAddVisit({
namespace = kNamespaceCompression,
name = "bzip2",
path = "Vendor/bzip2",
type = "StaticLib"
})
auAddVisit({
namespace = kNamespaceCompression,
name = "lz4",
path = "Vendor/lz4",
type = "StaticLib"
})
end
--auAddVisit({
-- namespace = kNamespaceCompression,
-- name = "lzma",
-- path = "Vendor/liblzma",
-- type = "StaticLib"
--})
auAddVisit({
namespace = kNamespaceCrypto,
name = "ltc",
path = "Vendor/libtomcrypt",
type = "StaticLib"
})
auAddVisit({
namespace = kNamespaceCrypto,
name = "ltm",
path = "Vendor/libtommath",
type = "StaticLib"
})
auAddVisit({
namespace = kNamespaceCrypto,
name = "mbedtls",
path = "Vendor/mbedtls",
type = "StaticLib"
})
auAddVisit({
namespace = kNamespaceStlEx,
name = "fmt",
path = "Vendor/fmt",
type = "StaticLib"
})
auAddVisit({
namespace = kNamespaceStlEx,
name = "json",
path = "Vendor/nlohmannjson",
type = "StaticLib"
})
auAddVisit({
namespace = kNamespaceRtSupport,
name = "mimalloc",
path = "Vendor/mimalloc",
type = "StaticLib"
})
auAddVisit({
namespace = kNamespaceRtSupport,
name = "o1heap",
path = "Vendor/o1heap",
type = "StaticLib"
})
auAddVisit({
namespace = "Aurora",
name = "AuroraRuntime",
path = "Aurora/Runtime",
type = "SharedLib",
out = "!"
})
auAddVisit({
namespace = "Aurora",
name = "AuroraForEach",
path = "Aurora/ForEach",
type = "StaticLib"
})
auAddVisit({
namespace = "Aurora",
name = "AuroraInterfaces",
path = "Aurora/Interfaces",
type = "StaticLib"
})
auAddVisit({
namespace = "Aurora",
name = "AuroraEnum",
path = "Aurora/Enum",
type = "StaticLib"
})
auAddVisit({
namespace = "Aurora",
name = "auROXTL",
path = "Aurora/ROXTL",
type = "StaticLib"
})
if (_OPTIONS["with-wxWidgets"]) then
auAddVisit({
namespace = kNamespaceFormats,
name = "png",
path = "Vendor/libpng",
type = "StaticLib"
})
auAddVisit({
namespace = kNamespaceFormats,
name = "expat",
path = "Vendor/libexpat",
type = "StaticLib"
})
end
if (_OPTIONS["with-v8"]) then
auAddVisit({
namespace = kNamespaceJS,
name = "V8",
path = "Vendor/v8",
type = "SharedLib",
out = "!"
})
auAddVisit({
namespace = kNamespaceJS,
name = "icu",
path = "Vendor/unicode",
type = "StaticLib"
})
end
auProcessSolution()
local processTests = function()
local addTestGroup = function(name)
local ns = "Test " .. name
auStartGroup(ns)
function dirName(fullPath)
local pos = (path.translate(fullPath):reverse()):find("%" .. path.getDefaultSeparator())
return (fullPath:sub(1 - pos))
end
local experiments = os.matchdirs("Tests/" .. name .. "/*")
auForEach(experiments, function(experimentDirectory)
local testName = dirName(experimentDirectory)
auStartProject({name = testName, projectType = "ConsoleApp", src = experimentDirectory, inc = experimentDirectory, root = experimentDirectory})
auLinkAndRefProject("AuroraRuntime")
location(experimentDirectory)
auFilter (auFilterOf({platforms = "win32"}))
defines "GTEST_OS_WINDOWS"
auFilter {}
auFilter (auFilterOf({platforms = "linux"}))
defines "GTEST_OS_LINUX"
auFilter {}
auFilter (auFilterOf({platforms = "mac"}))
defines "GTEST_OS_MAC"
auFilter {}
defines "GTEST_HAS_EXCEPTIONS"
includedirs {"Tests/googletest/googletest"}
includedirs {"Tests/googletest/googletest/include"}
files "Tests/googletest/googletest/src/gtest-all.cc"
files "Tests/Common/**.*"
end)
end
addTestGroup("Private")
addTestGroup("Public")
if (_OPTIONS["with-wxWidgets"]) then
addTestGroup("ToolKit")
end
end
processTests()