Add options to disable tests and examples from the build.

This commit is contained in:
Joao Matos 2019-12-26 21:04:39 +00:00
Родитель 24d2e4ca08
Коммит 8278efd338
2 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -15,6 +15,16 @@ newoption {
description = "disable C++-11 ABI on GCC 4.9+"
}
newoption {
trigger = "disable-tests",
description = "disable tests from being included"
}
newoption {
trigger = "disable-examples",
description = "disable examples from being included"
}
explicit_target_architecture = _OPTIONS["arch"]
function is_64_bits_mono_runtime()

Просмотреть файл

@ -39,14 +39,18 @@ workspace "CppSharp"
include (srcdir .. "/Generator.Tests")
include (srcdir .. "/Runtime")
if not _OPTIONS["disable-tests"] then
dofile "Tests.lua"
group "Tests"
IncludeTests()
end
if not _OPTIONS["disable-tests"] then
if string.starts(action, "vs") then
group "Examples"
IncludeExamples()
end
end