VC200x requires library names to be wrapped with quotes if they contain spaces
This commit is contained in:
parent
afdc2c37be
commit
1690d9b968
@ -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
|
||||
|
||||
|
||||
|
@ -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=""My Lib.lib""
|
||||
]]
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user