Change cpp unit test framework to catch2 for all cpp unit test projects

This commit is contained in:
Jan
2021-02-20 10:44:33 +01:00
parent 7ff87c2b73
commit b4f1e09315
7 changed files with 50 additions and 40 deletions

View File

@ -1,12 +1,16 @@
ObjCommonTests = {}
function ObjCommonTests:include()
if References:include(self:name()) then
includedirs {
path.join(TestFolder(), "ObjCommonTests")
}
end
end
function ObjCommonTests:link()
if References:link("ObjCommonTests") then
links "ObjCommonTests"
if References:link(self:name()) then
links(self:name())
end
end
@ -14,14 +18,18 @@ function ObjCommonTests:use()
end
function ObjCommonTests:name()
return "ObjCommonTests"
end
function ObjCommonTests:project()
References:reset()
local folder = TestFolder();
project "ObjCommonTests"
project(self:name())
targetdir(TargetDirectoryTest)
location "%{wks.location}/test/%{prj.name}"
kind "SharedLib"
kind "ConsoleApp"
language "C++"
files {
@ -38,6 +46,7 @@ function ObjCommonTests:project()
self:include()
ObjCommon:include()
catch2:include()
ObjCommon:link()
end