Created
May 18, 2014 19:22
-
-
Save dpo/da6946fe8060e48afec2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class AdolC < Formula | |
homepage "https://projects.coin-or.org/ADOL-C" | |
url "http://www.coin-or.org/download/source/ADOL-C/ADOL-C-2.5.0.tgz" | |
sha1 "3d3307037bb622499141a0e1eecfee195f3dcfcb" | |
head 'https://projects.coin-or.org/svn/ADOL-C/trunk/', :using => :svn | |
depends_on :autoconf => :build | |
depends_on :automake => :build | |
depends_on :libtool => :build | |
depends_on "colpack" => :recommended | |
fails_with :clang unless build.head? | |
fails_with :llvm | |
fails_with :gcc do | |
build 5666 | |
cause "C++ compilation error." | |
end | |
def install | |
if ENV.compiler == :clang | |
ENV.cxx11 | |
ENV.deparallelize | |
ohai "Activating c++11 mode" | |
end | |
# Configure may get automatically regenerated. So patch configure.ac. | |
inreplace %w(configure configure.ac) do |s| | |
s.gsub! "lib64", "lib" | |
end | |
args = ["--prefix=#{prefix}"] | |
args += ["--enable-sparse", | |
"--with-colpack=#{Formula['colpack'].prefix}"] if build.with? "colpack" | |
args << "--with-openmp-flag=-fopenmp" if ENV.compiler != :clang | |
ENV.append_to_cflags "-I#{buildpath}/ADOL-C/include/adolc" | |
system "./configure", *args | |
system "make install" | |
system "make test" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment