Merge pull request #1571 from cos-public/usefullpaths-vs-property
useFullPaths config property for Visual Studio projects
This commit is contained in:
commit
9b8b035a8a
@ -1510,3 +1510,42 @@
|
||||
</ClCompile>
|
||||
]]
|
||||
end
|
||||
|
||||
--
|
||||
-- If useFullPaths flag is set, add <UseFullPaths> element
|
||||
--
|
||||
|
||||
function suite.onUseFullPathsOff()
|
||||
usefullpaths "Off"
|
||||
prepare()
|
||||
test.capture [[
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.onUseFullPathsOn()
|
||||
usefullpaths "On"
|
||||
prepare()
|
||||
test.capture [[
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<UseFullPaths>true</UseFullPaths>
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.onUseFullPathsNotSpecified()
|
||||
prepare()
|
||||
test.capture [[
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
</ClCompile>
|
||||
]]
|
||||
end
|
@ -385,7 +385,8 @@
|
||||
m.callingConvention,
|
||||
m.languageStandard,
|
||||
m.conformanceMode,
|
||||
m.structMemberAlignment
|
||||
m.structMemberAlignment,
|
||||
m.useFullPaths
|
||||
}
|
||||
|
||||
if cfg.kind == p.STATICLIB then
|
||||
@ -1504,6 +1505,16 @@
|
||||
end
|
||||
end
|
||||
|
||||
function m.useFullPaths(cfg)
|
||||
if cfg.useFullPaths ~= nil then
|
||||
if cfg.useFullPaths then
|
||||
m.element("UseFullPaths", nil, "true")
|
||||
else
|
||||
m.element("UseFullPaths", nil, "false")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function m.additionalCompileOptions(cfg, condition)
|
||||
local opts = cfg.buildoptions
|
||||
if _ACTION == "vs2015" or vstudio.isMakefile(cfg) then
|
||||
|
@ -789,6 +789,12 @@
|
||||
kind = "boolean"
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "usefullpaths",
|
||||
scope = "config",
|
||||
kind = "boolean"
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "swiftversion",
|
||||
scope = "config",
|
||||
|
Loading…
Reference in New Issue
Block a user