|
@@ -1,7 +1,7 @@
|
|
|
package("dynareadout")
|
|
|
|
|
|
set_homepage("https://github.com/PucklaJ/dynareadout")
|
|
|
- set_description("Ansi C library for parsing binary output files of LS Dyna (d3plot, binout)")
|
|
|
+ set_description("High-Performance C/C++ library for parsing binary output files and key files of LS Dyna (d3plot, binout, input deck)")
|
|
|
|
|
|
add_urls("https://github.com/PucklaJ/dynareadout/archive/refs/tags/$(version).tar.gz",
|
|
|
"https://github.com/PucklaJ/dynareadout.git")
|
|
@@ -10,9 +10,11 @@ package("dynareadout")
|
|
|
add_versions("23.02", "054949a8774089fc217d7c0ec02996b53d331794c41941ed5006b90715bb4d30")
|
|
|
add_versions("23.04", "929efad70c68931f35c76336ea8b23bf2da46022d5fd570f4efc06d776a94604")
|
|
|
add_versions("23.05", "d33bb3acf6f62f7801c58755efbd49bfec2def37aee5397a17e2c38d8216bff6")
|
|
|
+ add_versions("23.06", "515f0b0d20c46e00f393fb9bb0f2baf303244d39e35a080741276681eb454926")
|
|
|
|
|
|
- add_configs("cpp", {description = "Build the C++ bindings", default = true, type = "boolean"})
|
|
|
- add_configs("profiling", {description = "Build with profiling features", default = false, type = "boolean"})
|
|
|
+ add_configs("cpp", {description = "Build the C++ bindings", default = true, type = "boolean"})
|
|
|
+ add_configs("profiling", {description = "Build with profiling features", default = false, type = "boolean"})
|
|
|
+ add_configs("thread_safe", {description = "Build with synchronisation for thread safety", default = true, type = "boolean"})
|
|
|
|
|
|
on_load(function (package)
|
|
|
if package:config("cpp") then
|
|
@@ -27,6 +29,7 @@ package("dynareadout")
|
|
|
configs.build_test = "n"
|
|
|
configs.build_cpp = package:config("cpp") and "y" or "n"
|
|
|
configs.profiling = package:config("profiling") and "y" or "n"
|
|
|
+ configs.thread_safe = package:config("thread_safe") and "y" or "n"
|
|
|
import("package.tools.xmake").install(package, configs)
|
|
|
end)
|
|
|
|
|
@@ -49,4 +52,8 @@ package("dynareadout")
|
|
|
}
|
|
|
]]}, {includes = "profiling.h", configs = {languages = "ansi"}}))
|
|
|
end
|
|
|
+ if package:config("thread_safe") then
|
|
|
+ assert(package:has_cfuncs("sync_create", {includes = "sync.h", configs = {languages = "ansi"}}))
|
|
|
+ assert(package:has_cfuncs("sync_lock", {includes = "sync.h", configs = {languages = "ansi"}}))
|
|
|
+ end
|
|
|
end)
|