Skip to content

Commit

Permalink
Moving /Fp flag to shared
Browse files Browse the repository at this point in the history
Moving /Fp flag from being a standalone function to shared flags.
  • Loading branch information
Sharlock93 committed Oct 22, 2023
1 parent c5c2523 commit 120d421
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions src/tools/msc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
-- Returns list of C compiler flags for a configuration.
--

local function getPchOutputFileFlag(cfg)
local res = '';
if cfg.pchoutputfile then
res = '/Fp' .. p.quoted(cfg.pchoutputfile)
end
return res
end

local function getRuntimeFlag(cfg, isstatic)
local rt = cfg.runtime
local flag = iif(isstatic, "/MT", "/MD")
Expand Down Expand Up @@ -155,7 +163,10 @@
usestandardpreprocessor = {
On = "/Zc:preprocessor",
Off = "/Zc:preprocessor-"
}
},
pchoutputfile = {
_ = function (cfg) return getPchOutputFileFlag(cfg) end
}

}

Expand Down Expand Up @@ -485,24 +496,3 @@

return result
end


--
-- Get precompiled header output filename
--
-- @param cfg
-- Project configuration
-- @return
-- The precompiled header's output file name
--

function msc.getpchoutputfile(cfg)
local res = {}

if(cfg.pchoutputfile) then
table.insert(res, '/Fp' .. p.quoted(cfg.pchoutputfile))
else

return res
end

0 comments on commit 120d421

Please sign in to comment.