update ghc_filesystem, gmsh and cli11 (#1775)

* update ghc_filesystem

* update gmsh

* update cli11

* fix gmsh

* fix gmsh test
pull/1781/head
Hoildkv 2 years ago committed by GitHub
parent 10ccb1e409
commit 45be76bb8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/c/cli11/xmake.lua
  2. 9
      packages/g/ghc_filesystem/xmake.lua
  3. 18
      packages/g/gmsh/xmake.lua

@ -6,7 +6,7 @@ package("cli11")
add_urls("https://github.com/CLIUtils/CLI11/archive/refs/tags/$(version).tar.gz",
"https://github.com/CLIUtils/CLI11.git")
add_versions("v2.3.2", "aac0ab42108131ac5d3344a9db0fdf25c4db652296641955720a4fbe52334e22")
add_versions("v2.2.0", "d60440dc4d43255f872d174e416705f56ba40589f6eb07727f76376fb8378fd6")
on_install("windows", "linux", "macosx", function (package)

@ -1,19 +1,18 @@
package("ghc_filesystem")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/gulrak/filesystem")
set_description("An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.")
set_description("An implementation of C++17 std::filesystem for C++11/C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.")
set_license("MIT")
add_urls("https://github.com/gulrak/filesystem/archive/refs/tags/$(version).tar.gz",
"https://github.com/gulrak/filesystem.git")
add_versions("v1.5.10", "9b96a024679807879fdfb30e46e8e461293666aeeee5fbf7f5af75aeacdfea29")
add_versions("v1.5.12", "7d62c5746c724d28da216d9e11827ba4e573df15ef40720292827a4dfd33f2e9")
add_deps("cmake")
on_install(function (package)
local configs = {"-DGHC_FILESYSTEM_BUILD_TESTING=OFF", "-DGHC_FILESYSTEM_BUILD_EXAMPLES=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)
@ -26,5 +25,5 @@ package("ghc_filesystem")
for (auto de : fs::directory_iterator(dir)) {
}
}
]]}, {configs = {languages = "c++17"}}))
]]}, {configs = {languages = "c++11"}}))
end)

@ -6,23 +6,31 @@ package("gmsh")
add_urls("http://gmsh.info/src/gmsh-$(version)-source.tgz")
add_versions("4.8.4", "760dbdc072eaa3c82d066c5ba3b06eacdd3304eb2a97373fe4ada9509f0b6ace")
add_versions("4.11.1", "c5fe1b7cbd403888a814929f2fd0f5d69e27600222a18c786db5b76e8005b365")
add_configs("openmp", {description = "Enable OpenMP support.", default = not is_plat("windows"), type = "boolean"})
add_deps("cmake")
if is_plat("windows") then
add_syslinks("shell32", "ws2_32", "winmm")
add_syslinks("shell32", "ws2_32", "winmm", "wsock32", "psapi")
end
on_load("windows", function (package)
if package:config("shared") then
on_load("windows", "macosx", "linux", function (package)
if package:is_plat("windows") and package:config("shared") then
package:add("defines", "GMSH_DLL")
end
if package:config("openmp") then
package:add("deps", "openmp")
end
end)
on_install("windows", "macosx", "linux", function (package)
io.replace("CMakeLists.txt", "add_definitions(-D_USE_MATH_DEFINES)", "add_definitions(-DWIN32)\nadd_definitions(-D_USE_MATH_DEFINES)", {plain = true})
local configs = {"-DENABLE_TESTS=OFF", "-DENABLE_GMP=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DENABLE_BUILD_LIB=" .. (package:config("shared") and "OFF" or "ON"))
table.insert(configs, "-DENABLE_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DENABLE_BUILD_DYNAMIC=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DENABLE_OPENMP=" .. (package:config("openmp") and "ON" or "OFF"))
if package:is_plat("windows") then
table.insert(configs, "-DENABLE_MSVC_STATIC_RUNTIME=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))
end
@ -34,7 +42,9 @@ package("gmsh")
end)
on_test(function (package)
os.vrun("gmsh -version")
if not package:is_cross() then
os.vrun("gmsh -version")
end
assert(package:check_cxxsnippets({test = [[
void test() {
gmsh::initialize();

Loading…
Cancel
Save