Added cleanExtensions(), with VC 201x support
This commit is contained in:
parent
7b8d4c4c98
commit
35582e2c4c
@ -117,6 +117,12 @@
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "cleanExtensions",
|
||||
scope = "config",
|
||||
kind = "list:string",
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "configmap",
|
||||
scope = "config",
|
||||
|
@ -182,6 +182,7 @@
|
||||
m.propertyGroup,
|
||||
m.outDir,
|
||||
m.intDir,
|
||||
m.extensionsToDeleteOnClean,
|
||||
}
|
||||
else
|
||||
return {
|
||||
@ -195,6 +196,7 @@
|
||||
m.targetExt,
|
||||
m.imageXexOutput,
|
||||
m.generateManifest,
|
||||
m.extensionsToDeleteOnClean,
|
||||
}
|
||||
end
|
||||
end
|
||||
@ -1024,6 +1026,14 @@
|
||||
end
|
||||
|
||||
|
||||
function m.extensionsToDeleteOnClean(cfg)
|
||||
if #cfg.cleanExtensions > 0 then
|
||||
local value = table.implode(cfg.cleanExtensions, "*", ";", "")
|
||||
m.element("ExtensionsToDeleteOnClean", nil, value .. "$(ExtensionsToDeleteOnClean)")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function m.floatingPointModel(cfg)
|
||||
if cfg.floatingpoint then
|
||||
p.w('<FloatingPointModel>%s</FloatingPointModel>', cfg.floatingpoint)
|
||||
|
@ -232,3 +232,24 @@
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Check the handling of extra cleaning extensions.
|
||||
--
|
||||
|
||||
function suite.extensionsToDeleteOnClean()
|
||||
cleanExtensions { ".temp1", ".temp2" }
|
||||
prepare()
|
||||
test.capture [[
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>.\</OutDir>
|
||||
<IntDir>obj\Debug\</IntDir>
|
||||
<TargetName>MyProject</TargetName>
|
||||
<TargetExt>.exe</TargetExt>
|
||||
<ExtensionsToDeleteOnClean>*.temp1;*.temp2;$(ExtensionsToDeleteOnClean)</ExtensionsToDeleteOnClean>
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user