xmake.lua 874 B

12345678910111213141516171819202122232425
  1. package("csa")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://epwalsh.github.io/software/csa")
  4. set_description("C++ header-only library for Coupled Simulated Annealing")
  5. set_license("MIT")
  6. add_urls("https://github.com/epwalsh/CSA.git")
  7. add_versions("2018.05.25", "3d7154fd35c35fb7297e25bd507c5e3f705b1ad6")
  8. add_deps("openmp")
  9. on_install("linux", "macosx", "windows", "mingw@msys", function (package)
  10. if package:has_tool("cxx", "gxx") then
  11. package:add("cxxflags", "-fpermissive")
  12. end
  13. os.cp("include", package:installdir())
  14. end)
  15. on_test(function (package)
  16. assert(package:check_cxxsnippets({test = [[
  17. void test() {
  18. CSA::Solver<double, double> solver;
  19. }
  20. ]]}, {configs = {languages = "c++11"}, includes = "csa.hpp"}))
  21. end)