Skip to content

Commit

Permalink
fix leaking of catch2 dep
Browse files Browse the repository at this point in the history
  • Loading branch information
GlynLeine committed Nov 9, 2024
1 parent 7e74dd3 commit 161d31a
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions premake/rythe/projects.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,7 @@ local function kindName(projectType, config)
elseif projectType == "editor" then
return "SharedLib"
elseif projectType == "application" then
if config == rythe.Configuration.RELEASE then
return "WindowedApp"
else
return "ConsoleApp"
end
return "ConsoleApp"
elseif projectType == "library" then
return "StaticLib"
elseif projectType == "header-only" then
Expand Down Expand Up @@ -386,19 +382,29 @@ local function getDepsRecursive(project, projectType)
deps = {}
end

local copy = utils.copyTable(deps)

if projectType == "test" then
deps[#deps + 1] = "third_party/catch2"
end
local containsCatch = false

local copy = utils.copyTable(deps)
for i, dep in ipairs(copy) do
if string.match(dep, "third_party/catch2") then
containsCatch = true
end
end

if containsCatch == false then
copy[#copy + 1] = "third_party/catch2"
end
end

local set = {}

for i, dep in ipairs(deps) do
for i, dep in ipairs(copy) do
set[dep] = true
end

for i, dep in ipairs(deps) do
for i, dep in ipairs(copy) do
local assemblyId, scope = getDepAssemblyAndScope(dep)
local depProject, depId, depType = findAssembly(assemblyId)

Expand Down

0 comments on commit 161d31a

Please sign in to comment.