improve cp exe

verilator-cmake
star9029 2 weeks ago
parent 03bf723179
commit fe82a05307
  1. 27
      packages/v/verilator/xmake.lua

@ -84,21 +84,24 @@ package("verilator")
end
cmake.install(package, configs, opt)
local bindir = package:installdir("bin")
local subfix = (is_host("windows") and ".exe" or "")
local verilator = path.join(bindir, "verilator" .. subfix)
if not os.isfile(verilator) then
local verilator_bin = "verilator_bin"
if package:is_debug() then
verilator_bin = verilator_bin .. "_dbg"
if is_host("windows") then
local bindir = package:installdir("bin")
local verilator = path.join(bindir, "verilator.exe")
if not os.isfile(verilator) then
local verilator_bin = "verilator_bin"
if package:is_debug() then
verilator_bin = verilator_bin .. "_dbg"
end
verilator_bin = path.join(bindir, verilator_bin .. ".exe")
os.trycp(verilator_bin, verilator)
end
if package:is_plat("windows") and package:is_debug() then
os.vcp(path.join(package:buildir(), "**.pdb"), package:installdir("bin"))
end
verilator_bin = path.join(bindir, verilator_bin .. subfix)
os.trycp(verilator_bin, verilator)
end
end)
on_test(function (package)
if not package:is_cross() then
os.vrun("verilator --version")
end
os.vrun("verilator --version")
end)

Loading…
Cancel
Save