add lemon and soplex (#703)
* add soplex * add lemon * update vcglib * update xtensor * fix xsimd * fix flag on windows * make avx defaultpull/705/head
parent
a0028a92a4
commit
c2b3a855ae
7 changed files with 93 additions and 14 deletions
@ -0,0 +1,24 @@ |
||||
package("lemon") |
||||
|
||||
set_homepage("https://lemon.cs.elte.hu/trac/lemon") |
||||
set_description("Library for Efficient Modeling and Optimization in Networks.") |
||||
set_license("BSL-1.0") |
||||
|
||||
add_urls("http://lemon.cs.elte.hu/pub/sources/lemon-$(version).tar.gz") |
||||
add_versions("1.3.1", "71b7c725f4c0b4a8ccb92eb87b208701586cf7a96156ebd821ca3ed855bad3c8") |
||||
|
||||
if is_plat("windows") then |
||||
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true}) |
||||
end |
||||
|
||||
add_deps("cmake") |
||||
on_install("windows", "macosx", "linux", function (package) |
||||
local configs = {"-DLEMON_ENABLE_GLPK=OFF", "-DLEMON_ENABLE_ILOG=OFF", "-DLEMON_ENABLE_COIN=OFF", "-DLEMON_ENABLE_SOPLEX=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) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cxxtypes("lemon::SmartDigraph", {configs = {languages = "c++11"}, includes = "lemon/smart_graph.h"})) |
||||
end) |
@ -0,0 +1,34 @@ |
||||
package("soplex") |
||||
|
||||
set_homepage("https://soplex.zib.de/") |
||||
set_description("SoPlex is an optimization package for solving linear programming problems (LPs) based on an advanced implementation of the primal and dual revised simplex algorithm.") |
||||
|
||||
add_urls("https://soplex.zib.de/download/release/soplex-$(version).tgz") |
||||
add_versions("5.0.2", "eaaf3b1d0e8832b25e9f4c1e44bd935c869a487b26e86c2c41856f850b22f4dd") |
||||
|
||||
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true}) |
||||
|
||||
add_deps("cmake", "zlib") |
||||
if is_plat("macosx", "linux") then |
||||
add_deps("gmp") |
||||
end |
||||
add_links("soplex") |
||||
on_install("windows", "macosx", "linux", function (package) |
||||
local configs = {"-DBOOST=OFF"} |
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
||||
if package:is_plat("windows") then |
||||
table.insert(configs, "-DMT=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
||||
end |
||||
import("package.tools.cmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <soplex.h> |
||||
void test() { |
||||
using namespace soplex; |
||||
SoPlex mysoplex; |
||||
mysoplex.setIntParam(SoPlex::OBJSENSE, SoPlex::OBJSENSE_MINIMIZE); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}})) |
||||
end) |
Loading…
Reference in new issue