Skip to content

Commit 8278efd

Browse files
committed
Add options to disable tests and examples from the build.
1 parent 24d2e4c commit 8278efd

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

build/Helpers.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ newoption {
1515
description = "disable C++-11 ABI on GCC 4.9+"
1616
}
1717

18+
newoption {
19+
trigger = "disable-tests",
20+
description = "disable tests from being included"
21+
}
22+
23+
newoption {
24+
trigger = "disable-examples",
25+
description = "disable examples from being included"
26+
}
27+
1828
explicit_target_architecture = _OPTIONS["arch"]
1929

2030
function is_64_bits_mono_runtime()

build/premake5.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,18 @@ workspace "CppSharp"
3939
include (srcdir .. "/Generator.Tests")
4040
include (srcdir .. "/Runtime")
4141

42+
if not _OPTIONS["disable-tests"] then
4243
dofile "Tests.lua"
4344

4445
group "Tests"
4546
IncludeTests()
47+
end
4648

49+
if not _OPTIONS["disable-tests"] then
4750
if string.starts(action, "vs") then
4851

4952
group "Examples"
5053
IncludeExamples()
5154

5255
end
56+
end

0 commit comments

Comments
 (0)