homebrew-core/Formula/libcds.rb

38 lines
1.3 KiB
Ruby

class Libcds < Formula
desc "C++ library of Concurrent Data Structures"
homepage "https://libcds.sourceforge.io/doc/cds-api/index.html"
url "https://github.com/khizmax/libcds/archive/v2.3.3.tar.gz"
sha256 "f090380ecd6b63a3c2b2f0bdb27260de2ccb22486ef7f47cc1175b70c6e4e388"
license "BSL-1.0"
bottle do
sha256 cellar: :any, big_sur: "8933bb8f315e15e385985ba2ddd4b1ebecbcce970fa434afb8648d1d95b34e5d"
sha256 cellar: :any, catalina: "d2ac7fe9c424707b1a2698fabed2a81645bb4f79f9fb943a279aee1cfc5d38d9"
sha256 cellar: :any, mojave: "ed2baad62fe26da2891255221ee90a8d69f84214431dce923dd7c55aafa39668"
sha256 cellar: :any, high_sierra: "9723b22f7a6e84ef208226241ed3b19dd02b4c9aed9c01284f55bd9b825e216e"
sha256 cellar: :any, sierra: "fdc30046c9f96c04d7c52d43e948d2e238fb93eee5514101a0dd0ca4de3f2b32"
end
depends_on "cmake" => :build
depends_on "boost"
def install
system "cmake", ".", *std_cmake_args
system "make", "install"
end
test do
(testpath/"test.cpp").write <<~EOS
#include <cds/init.h>
int main() {
cds::Initialize();
cds::threading::Manager::attachThread();
cds::Terminate();
return 0;
}
EOS
system ENV.cxx, "-o", "test", "test.cpp", "-L#{lib}64", "-lcds", "-std=c++11"
system "./test"
end
end