Skip to content

Commit

Permalink
Add 'preferredtoolarchitecture' API
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom van Dijck committed Jun 20, 2017
1 parent 9dc4da4 commit 9db7b30
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/vstudio/vs2010_vcxproj.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
m.keyword,
m.projectName,
m.targetPlatformVersion,
m.preferredToolArchitecture
}
end

Expand Down Expand Up @@ -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")
Expand Down
11 changes: 11 additions & 0 deletions src/_premake_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9db7b30

Please sign in to comment.