Skip to content

Commit

Permalink
Add gmp through Homebrew #4
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Oct 12, 2016
1 parent 6683978 commit 8198ec0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ BinDeps
MathProgBase
Polyhedra 0.1
@windows WinRPM
@osx Homebrew
12 changes: 8 additions & 4 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cddname = "cddlib-$cddlib_commit"
#libgmpdev = library_dependency("libgmp-dev", aliases=["libgmp"])

#GMP
@linux_only begin
@static if is_linux()
const has_apt = try success(`apt-get -v`) catch e false end
const has_yum = try success(`yum --version`) catch e false end
const has_pacman = try success(`pacman -Qq`) catch e false end
Expand All @@ -33,7 +33,11 @@ cddname = "cddlib-$cddlib_commit"
println("\$ sudo $pkgman install $pkgname")
end
end
@windows_only begin
@static if is_apple()
using Homebrew
Homebrew.add("gmp")
end
@static if is_windows()
using WinRPM
#libgmp = library_dependency("libgmp", aliases=["libgmp-10"])
#provides(WinRPM.RPM, "libgmp10", [libgmp], os = :Windows)
Expand All @@ -44,10 +48,10 @@ end

official_repo = "ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/$cddname.tar.gz"
forked_repo = "https://github.com/blegat/cddlib/archive/$cddlib_commit.zip"
@unix_only begin
@static if is_unix()
libcdd = library_dependency("libcddgmp", aliases=["libcdd-$cddlib_commit", "libcddgmp-0"])#, depends=[libgmpdev])
end
@windows_only begin
@static if is_windows()
libcdd = library_dependency("libcddgmp", aliases=["libcddgmp-0"]) #, depends=[libgmp])
using WinRPM
push!(WinRPM.sources, "https://cache.julialang.org/http://download.opensuse.org/repositories/home:/blegat:/branches:/windows:/mingw:/win32/openSUSE_13.2")
Expand Down

0 comments on commit 8198ec0

Please sign in to comment.