Skip to content

Instantly share code, notes, and snippets.

@Kronuz
Last active June 4, 2020 02:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save Kronuz/96ac10fbd8472eb1e7566d740c4034f8 to your computer and use it in GitHub Desktop.
Save Kronuz/96ac10fbd8472eb1e7566d740c4034f8 to your computer and use it in GitHub Desktop.
Homebrew Formula for Google Test
# Homebrew Formula for Google Test
# Usage: brew install --HEAD https://gist.githubusercontent.com/Kronuz/96ac10fbd8472eb1e7566d740c4034f8/raw/gtest.rb
require 'formula'
class Gtest < Formula
desc "Google Test"
homepage "https://github.com/google/googletest"
head "git://github.com/google/googletest.git", :using => :git
stable do
url "https://github.com/google/googletest/archive/release-1.8.0.tar.gz"
sha256 "58a6f4277ca2bc8565222b3bbd58a177609e9c488e8a72649359ba51450db7d8"
end
depends_on "cmake" => :build
def install
mkdir "build" do
system "cmake", "..", *std_cmake_args
system "make", "install"
end
end
end
@razorback16
Copy link

It complains about some C++ syntax. Adding C++11 support on line 20 will make it compile and work properly. Can you please add this change?
system "cmake", "..", "-DCMAKE_CXX_STANDARD=11", *std_cmake_args

@Napoleon-BlownApart
Copy link

Issue google/googletest#1323 gives a code update fix for 1.7.0; replacing NULL with nullptr.
Is this package 'drop-in' compatible with gtest 1.7.0? I suspect it might not be due to the version difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment