Skip to content

Commit

Permalink
capnp: vendor gtest
Browse files Browse the repository at this point in the history
Fixes #5435.
  • Loading branch information
dunn committed Dec 2, 2016
1 parent 4a4d747 commit dd3c521
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Formula/capnp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,23 @@ class Capnp < Formula
needs :cxx11
depends_on "cmake" => :build

resource "gtest" do
url "https://github.com/google/googletest/archive/release-1.7.0.tar.gz"
sha256 "f73a6546fdf9fce9ff93a5015e0333a8af3062a152a9ad6bcb772c96687016cc"
end

def install
ENV.cxx11

gtest = resource("gtest")
gtest.verify_download_integrity(gtest.fetch)
inreplace "src/CMakeLists.txt" do |s|
s.gsub! "http://googletest.googlecode.com/files/gtest-1.7.0.zip",
gtest.cached_download
s.gsub! "URL_MD5 2d6ec8ccdf5c46b05ba54a9fd1d130d7",
"URL_HASH SHA256=#{gtest.checksum}"
end

mkdir "build" do
system "cmake", "..", *std_cmake_args
system "make", "check"
Expand Down

0 comments on commit dd3c521

Please sign in to comment.