Add 'preferredtoolarchitecture' API

This commit is contained in:
Tom van Dijck 2017-05-09 09:13:28 -07:00
parent 411a808070
commit 6f2e6f5a0e
2 changed files with 21 additions and 0 deletions

View File

@ -127,6 +127,7 @@
m.keyword,
m.projectName,
m.targetPlatformVersion,
m.preferredToolArchitecture
}
end
@ -2172,6 +2173,15 @@
end
function m.preferredToolArchitecture(prj)
if prj.preferredtoolarchitecture == p.X86_64 then
m.element("PreferredToolArchitecture", nil, 'x64')
elseif prj.preferredtoolarchitecture == p.X86 then
m.element("PreferredToolArchitecture", nil, 'x86')
end
end
function m.treatLinkerWarningAsErrors(cfg)
if cfg.flags.FatalLinkWarnings then
local el = iif(cfg.kind == p.STATICLIB, "Lib", "Linker")

View File

@ -1244,6 +1244,17 @@
kind = "boolean",
}
api.register {
name = "preferredtoolarchitecture",
scope = "workspace",
kind = "string",
allowed = {
"Default",
p.X86,
p.X86_64,
}
}
-----------------------------------------------------------------------------
--
-- Field name aliases for backward compatibility