Skip to content

Commit

Permalink
csa: add package (#5011)
Browse files Browse the repository at this point in the history
* csa: add package

* limit plat
  • Loading branch information
star-hengxing authored Aug 23, 2024
1 parent 90e0654 commit bdbe64b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/c/csa/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package("csa")
set_kind("library", {headeronly = true})
set_homepage("https://epwalsh.github.io/software/csa")
set_description("C++ header-only library for Coupled Simulated Annealing")
set_license("MIT")

add_urls("https://github.com/epwalsh/CSA.git")
add_versions("2018.05.25", "3d7154fd35c35fb7297e25bd507c5e3f705b1ad6")

add_deps("openmp")

on_install("linux", "macosx", "windows", "mingw@msys", function (package)
if package:has_tool("cxx", "gxx") then
package:add("cxxflags", "-fpermissive")
end
os.cp("include", package:installdir())
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
CSA::Solver<double, double> solver;
}
]]}, {configs = {languages = "c++11"}, includes = "csa.hpp"}))
end)

0 comments on commit bdbe64b

Please sign in to comment.