aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/cpputest.rb
blob: ec5ba89cfb8b63020fa73201ee5c33defae7dd03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'formula'

class Cpputest < Formula
  homepage 'http://www.cpputest.org/'
  url 'http://downloads.sourceforge.net/project/cpputest/cpputest/v2.3/CppUTest-v2.3.zip'
  md5 '0546bf6d0f1513842cfa781255dcbdda'

  def install
    system "make"
    lib.install 'lib/libCppUTest.a'
    include.install 'include/CppUTest'
  end
end
an> "objective-caml" => :build depends_on "coq" => :build depends_on "menhir" => :build def install ENV.permit_arch_flags # Compcert's configure script hard-codes gcc. On Lion and under, this # creates problems since XCode's gcc does not support CFI, # but superenv will trick it into using clang which does. This # causes problems with the compcert compiler at runtime. inreplace "configure", "${toolprefix}gcc", "${toolprefix}#{ENV.cc}" system "./configure", "-prefix", prefix, "ia32-macosx" system "make", "all" system "make", "install" end test do (testpath/"test.c").write <<-EOS.undent int printf(const char *fmt, ...); int main(int argc, char** argv) { printf("Hello, world!\\n"); return 0; } EOS system "#{bin}/ccomp", "test.c", "-o", "test" system "./test" end end