remove dependency on msys for boost (#1993)

* fix bootstrap_argv for bootstrap.bat and
conflict between project-config.jam and user-config.jam

* add toolset arg to argv
pull/1997/head
wanzzhehe 2 years ago committed by GitHub
parent 768af5d6f4
commit 141dd76df5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      packages/b/boost/xmake.lua

@ -152,10 +152,14 @@ package("boost")
if package:is_plat("windows") then if package:is_plat("windows") then
import("core.tool.toolchain") import("core.tool.toolchain")
local runenvs = toolchain.load("msvc"):runenvs() local runenvs = toolchain.load("msvc"):runenvs()
-- for bootstrap.bat, all other arguments are useless
bootstrap_argv = { "msvc" }
os.vrunv("bootstrap.bat", bootstrap_argv, {envs = runenvs}) os.vrunv("bootstrap.bat", bootstrap_argv, {envs = runenvs})
elseif package:is_plat("mingw") and is_host("windows") then elseif package:is_plat("mingw") and is_host("windows") then
os.vrunv("sh", table.join("./bootstrap.sh", bootstrap_argv)) bootstrap_argv = { "gcc" }
os.cp("./tools/build/src/engine/b2.exe", ".") os.vrunv("bootstrap.bat", bootstrap_argv)
-- todo looking for better solution to fix the confict between user-config.jam and project-config.jam
io.replace("project-config.jam", "using[^\n]+", "")
else else
os.vrunv("./bootstrap.sh", bootstrap_argv) os.vrunv("./bootstrap.sh", bootstrap_argv)
end end
@ -196,6 +200,9 @@ package("boost")
table.insert(argv, "runtime-link=shared") table.insert(argv, "runtime-link=shared")
end end
table.insert(argv, "cxxflags=-std:c++14") table.insert(argv, "cxxflags=-std:c++14")
table.insert(argv, "toolset=msvc")
elseif package:is_plat("mingw") then
table.insert(argv, "toolset=gcc")
else else
table.insert(argv, "cxxflags=-std=c++14") table.insert(argv, "cxxflags=-std=c++14")
if package:config("pic") ~= false then if package:config("pic") ~= false then

Loading…
Cancel
Save