Skip to content

Commit

Permalink
Ninja/Solution: do not add libs to 'all' if when they don't require l…
Browse files Browse the repository at this point in the history
…inking
  • Loading branch information
KageKirin committed Feb 28, 2020
1 parent 20dfa8c commit 816e148
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/actions/ninja/ninja_solution.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,22 @@ end
cfgs[key] = cfg:getoutputfilename() .. " "

if not cfgs["all"] then cfgs["all"] = "" end
cfgs["all"] = cfgs["all"] .. cfg:getoutputfilename() .. " "

-- set first configuration name
-- set first configuration name and 'all' configs to build
if (cfg_start == nil) and (cfg.solution.startproject == key) then
cfg_start = key
end
if (cfg_first == nil) and (cfg.kind == "ConsoleApp" or cfg.kind == "WindowedApp") then
cfg_first = key
cfgs["all"] = cfgs["all"] .. cfg:getoutputfilename() .. " "
end
if (cfg_first_lib == nil) and (cfg.kind == "StaticLib" or cfg.kind == "SharedLib") then
cfg_first_lib = key

-- only set if there's actually something to build
if table.icontains(table.translate(cfg.files, path.issourcefile), true) then
cfgs["all"] = cfgs["all"] .. cfg:getoutputfilename() .. " "
end
end

-- include other ninja file
Expand Down

0 comments on commit 816e148

Please sign in to comment.