chore: check exact paths of test executable and provide temp dir

This commit is contained in:
Jan
2025-01-05 00:13:46 +00:00
parent fc9e6ce14d
commit ce3786f086
12 changed files with 151 additions and 0 deletions

51
test/Catch2Common.lua Normal file
View File

@ -0,0 +1,51 @@
Catch2Common = {}
function Catch2Common:include(includes)
if includes:handle(self:name()) then
includedirs {
path.join(TestFolder(), "Catch2Common")
}
end
end
function Catch2Common:link(links)
links:add(self:name())
links:linkto(catch2)
end
function Catch2Common:use()
end
function Catch2Common:name()
return "Catch2Common"
end
function Catch2Common:project()
local folder = TestFolder()
local includes = Includes:create()
local links = Links:create()
project(self:name())
targetdir(TargetDirectoryTest)
location "%{wks.location}/test/%{prj.name}"
kind "StaticLib"
language "C++"
files {
path.join(folder, "Catch2Common/**.h"),
path.join(folder, "Catch2Common/**.cpp")
}
vpaths {
["*"] = {
path.join(folder, "Catch2Common")
}
}
self:include(includes)
catch2:include(includes)
links:linkto(catch2)
links:linkall()
end