Browse Source

Implemented mapping of MSVC to VS 2017 in build scripts.

pull/790/head
Joao Matos 8 years ago
parent
commit
3ee3a5b9a2
  1. 16
      build/scripts/LLVM.lua

16
build/scripts/LLVM.lua

@ -47,19 +47,19 @@ function clone_llvm() @@ -47,19 +47,19 @@ function clone_llvm()
git.reset_hard(llvm, llvm_release)
git.reset_hard(clang, clang_release)
end
function get_vs_version()
local function map_msvc_to_vs_version(ver)
if ver == "19" then return "vs2015"
elseif ver == "18" then return "vs2013"
elseif ver == "17" then return "vs2012"
local function map_msvc_to_vs_version(major, minor)
if major == "19" and minor == "10" then return "vs2017"
elseif major == "19" then return "vs2015"
elseif major == "18" then return "vs2013"
elseif major == "17" then return "vs2012"
else error("Unknown MSVC compiler version, run in VS command prompt.") end
end
local out = outputof("cl")
local ver, arch = string.match(out, '(%d+).%d+.%d+.?%d*%s+')
return map_msvc_to_vs_version(ver)
local major, minor = string.match(out, '(%d+).(%d+).%d+.?%d*%s+')
return map_msvc_to_vs_version(major, minor)
end
function get_toolset_configuration_name()

Loading…
Cancel
Save