Reduced redundant code and added another test case.
This commit is contained in:
parent
88649340e5
commit
9fe297f5bb
@ -147,3 +147,16 @@ function suite.TreatAngleIncludeAsExternalOnFile()
|
||||
<TreatAngleIncludeAsExternal>true</TreatAngleIncludeAsExternal>
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.TreatAngleIncludeAsExternalOffFile()
|
||||
files { "hello1.cpp", "hello2.cpp" }
|
||||
filter { "files:hello2.cpp" }
|
||||
externalanglebrackets "Off"
|
||||
prepareFiles()
|
||||
test.capture [[
|
||||
<ItemGroup>
|
||||
<ClCompile Include="hello1.cpp" />
|
||||
<ClCompile Include="hello2.cpp">
|
||||
<TreatAngleIncludeAsExternal>false</TreatAngleIncludeAsExternal>
|
||||
]]
|
||||
end
|
||||
|
@ -821,7 +821,7 @@
|
||||
m.warningLevelFile,
|
||||
m.compileAsWinRT,
|
||||
m.externalWarningLevelFile,
|
||||
m.externalAngleBracketsFile,
|
||||
m.externalAngleBrackets,
|
||||
}
|
||||
else
|
||||
return {
|
||||
@ -2872,18 +2872,7 @@
|
||||
end
|
||||
|
||||
|
||||
function m.externalAngleBrackets(cfg)
|
||||
if _ACTION >= "vs2022" then
|
||||
if cfg.externalanglebrackets == p.OFF then
|
||||
m.element("TreatAngleIncludeAsExternal", nil, "false")
|
||||
elseif cfg.externalanglebrackets == p.ON then
|
||||
m.element("TreatAngleIncludeAsExternal", nil, "true")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function m.externalAngleBracketsFile(cfg, condition)
|
||||
function m.externalAngleBrackets(cfg, condition)
|
||||
if _ACTION >= "vs2022" then
|
||||
if cfg.externalanglebrackets == p.OFF then
|
||||
m.element("TreatAngleIncludeAsExternal", condition, "false")
|
||||
|
Reference in New Issue
Block a user