spdlog 0.11.0 (new formula)

Closes #8824.

Signed-off-by: William Woodruff <william@tuffbizz.com>
This commit is contained in:
Andrew Hundt 2017-01-14 01:56:15 -05:00 committed by William Woodruff
parent 5df5c1ee3e
commit b6ff9afafc
No known key found for this signature in database
GPG key ID: 85AE00C504833B3C

36
Formula/spdlog.rb Normal file
View file

@ -0,0 +1,36 @@
class Spdlog < Formula
desc "Super fast C++ logging library."
homepage "https://github.com/gabime/spdlog"
url "https://github.com/gabime/spdlog/archive/v0.11.0.tar.gz"
sha256 "8c0f1810fb6b7d23fef70c2ea8b6fa6768ac8d18d6e0de39be1f48865e22916e"
head "https://github.com/gabime/spdlog.git"
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