Skip to content

capnp: vendor gtest #5773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Formula/capnp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,25 @@ 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"
system "make", "install"
end
end
Expand Down