2017-01-14 06:56:15 +00:00
|
|
|
class Spdlog < Formula
|
|
|
|
desc "Super fast C++ logging library."
|
|
|
|
homepage "https://github.com/gabime/spdlog"
|
2017-03-07 20:17:45 +00:00
|
|
|
url "https://github.com/gabime/spdlog/archive/v0.12.0.tar.gz"
|
|
|
|
sha256 "5cfd6a0b3182a88e1eb35bcb65a7ef9035140d7c73b16ba6095939dbf07325b9"
|
2017-01-14 06:56:15 +00:00
|
|
|
head "https://github.com/gabime/spdlog.git"
|
|
|
|
|
2017-01-24 04:55:05 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2017-03-07 21:30:40 +00:00
|
|
|
sha256 "4bf4de89ae561eb4cf12aa1aeab454274533f8ec0aa8c253993b65e39781f66b" => :sierra
|
|
|
|
sha256 "4bf4de89ae561eb4cf12aa1aeab454274533f8ec0aa8c253993b65e39781f66b" => :el_capitan
|
|
|
|
sha256 "4bf4de89ae561eb4cf12aa1aeab454274533f8ec0aa8c253993b65e39781f66b" => :yosemite
|
2017-01-24 04:55:05 +00:00
|
|
|
end
|
|
|
|
|
2017-01-14 06:56:15 +00:00
|
|
|
depends_on "cmake" => :build
|
|
|
|
|
|
|
|
needs :cxx11
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.cxx11
|
|
|
|
|
|
|
|
mkdir "spdlog-build" do
|
|
|
|
args = std_cmake_args
|
|
|
|
args << "-Dpkg_config_libdir=#{lib}" << ".."
|
|
|
|
system "cmake", *args
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.cpp").write <<-EOS.undent
|
|
|
|
#include "spdlog/spdlog.h"
|
|
|
|
#include <iostream>
|
|
|
|
#include <memory>
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
auto console = spdlog::stdout_logger_mt("console");
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system ENV.cxx, "-std=c++11", "test.cpp", "-I#{include}", "-o", "test"
|
|
|
|
system "./test"
|
|
|
|
end
|
|
|
|
end
|