spdlog 0.11.0 (new formula)
Closes #8824. Signed-off-by: William Woodruff <william@tuffbizz.com>
This commit is contained in:
parent
5df5c1ee3e
commit
b6ff9afafc
1 changed files with 36 additions and 0 deletions
36
Formula/spdlog.rb
Normal file
36
Formula/spdlog.rb
Normal 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
|
Loading…
Reference in a new issue