Merge pull request #811 from Blizzard/preferredtoolarchitecture
Add 'preferredtoolarchitecture' API
This commit is contained in:
commit
5d141f52a0
@ -127,6 +127,7 @@
|
||||
m.keyword,
|
||||
m.projectName,
|
||||
m.targetPlatformVersion,
|
||||
m.preferredToolArchitecture
|
||||
}
|
||||
end
|
||||
|
||||
@ -2172,6 +2173,21 @@
|
||||
end
|
||||
|
||||
|
||||
function m.preferredToolArchitecture(prj)
|
||||
if _ACTION >= "vs2013" then
|
||||
if prj.preferredtoolarchitecture == p.X86_64 then
|
||||
m.element("PreferredToolArchitecture", nil, 'x64')
|
||||
elseif prj.preferredtoolarchitecture == p.X86 then
|
||||
m.element("PreferredToolArchitecture", nil, 'x86')
|
||||
end
|
||||
else
|
||||
if prj.preferredtoolarchitecture == p.X86_64 then
|
||||
m.element("UseNativeEnvironment", nil, 'true')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function m.treatLinkerWarningAsErrors(cfg)
|
||||
if cfg.flags.FatalLinkWarnings then
|
||||
local el = iif(cfg.kind == p.STATICLIB, "Lib", "Linker")
|
||||
|
@ -1246,6 +1246,17 @@
|
||||
kind = "boolean",
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "preferredtoolarchitecture",
|
||||
scope = "workspace",
|
||||
kind = "string",
|
||||
allowed = {
|
||||
"Default",
|
||||
p.X86,
|
||||
p.X86_64,
|
||||
}
|
||||
}
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
--
|
||||
-- Field name aliases for backward compatibility
|
||||
|
Reference in New Issue
Block a user