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-28 05:30:01 +00:00
|
|
|
url "https://github.com/gabime/spdlog/archive/v0.13.0.tar.gz"
|
|
|
|
sha256 "d798a6ca19165f0a18a43938859359269f5a07fd8e0eb83ab8674739c9e8f361"
|
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-28 05:49:59 +00:00
|
|
|
sha256 "162184d4c669bf4ec4f87166e87215b7eff9ae9cdc21a52ea1355b9324386604" => :sierra
|
|
|
|
sha256 "162184d4c669bf4ec4f87166e87215b7eff9ae9cdc21a52ea1355b9324386604" => :el_capitan
|
|
|
|
sha256 "162184d4c669bf4ec4f87166e87215b7eff9ae9cdc21a52ea1355b9324386604" => :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
|