VC200x requires library names to be wrapped with quotes if they contain spaces

This commit is contained in:
Jason Perkins 2012-11-26 10:09:50 -05:00
parent afdc2c37be
commit 1690d9b968
2 changed files with 24 additions and 3 deletions

View File

@ -952,9 +952,13 @@
function vc200x.links(cfg)
local links = config.getlinks(cfg, "all", "fullpath")
links = table.concat(links, " ")
links = path.translate(links)
return links
for i, link in ipairs(links) do
if link:find(" ", 1, true) then
link = '"' .. link .. '"'
end
links[i] = path.translate(link)
end
return table.concat(links, " ")
end

View File

@ -201,3 +201,20 @@
/>
]]
end
--
-- Libraries with spaces in the name must be wrapped in quotes.
--
function suite.wrapsWithQuotes_onSpaceInLibraryName()
links { "My Lib" }
prepare()
test.capture [[
<Tool
Name="VCLinkerTool"
LinkLibraryDependencies="false"
AdditionalDependencies="&quot;My Lib.lib&quot;"
]]
end