Add 'preferredtoolarchitecture' API
This commit is contained in:
parent
411a808070
commit
6f2e6f5a0e
@ -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")
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user