aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPete Gadomski2014-05-20 16:29:28 -0600
committerJack Nagel2014-07-18 17:23:57 -0500
commit2c8906722de32eb3bbbfd91f19fbe5fa159bf97d (patch)
treec21c93266caac33ef89712a4aba6b08f97aeef30
parentaae0909facd56bff446a9dc631193e69da597174 (diff)
downloadhomebrew-2c8906722de32eb3bbbfd91f19fbe5fa159bf97d.tar.bz2
New formula: cereal 1.0.0
Add cereal 1.0.0, a C++11 header-only library for serialization. This formula includes a "with-tests" option, which can be used to build and run cereal's internal unit test suite before installation. Note that these tests are broken for tag 1.0.0, but are not (currently) broken for the "develop" branch. Closes #29438. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rw-r--r--Library/Formula/cereal.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/Library/Formula/cereal.rb b/Library/Formula/cereal.rb
new file mode 100644
index 000000000..68f8e57e3
--- /dev/null
+++ b/Library/Formula/cereal.rb
@@ -0,0 +1,22 @@
+require "formula"
+
+class Cereal < Formula
+ homepage "http://uscilab.github.io/cereal/"
+ url "https://github.com/USCiLab/cereal/archive/v1.0.0.tar.gz"
+ sha1 "a8e409deb2bdba6bdbc04d3eb2d5294d4cc4b9e2"
+
+ head "https://github.com/USCiLab/cereal.git", :branch => "develop"
+
+ option "with-tests", "Build and run the test suite"
+
+ depends_on "cmake" => :build if build.with? "tests"
+
+ def install
+ if build.with? "tests"
+ system "cmake", ".", *std_cmake_args
+ system "make"
+ system "make", "test"
+ end
+ include.install "include/cereal"
+ end
+end