diff --git a/Formula/console_bridge.rb b/Formula/console_bridge.rb new file mode 100644 index 0000000000..b5c4385a9d --- /dev/null +++ b/Formula/console_bridge.rb @@ -0,0 +1,29 @@ +class ConsoleBridge < Formula + desc "Robot Operating System-independent package for logging" + homepage "https://wiki.ros.org/console_bridge/" + url "https://github.com/ros/console_bridge/archive/0.3.2.tar.gz" + sha256 "fd12e48c672cb9c5d516d90429c4a7ad605859583fc23d98258c3fa7a12d89f4" + + depends_on "cmake" => :build + + needs :cxx11 + + def install + ENV.cxx11 + system "cmake", ".", *std_cmake_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~EOS + #include + int main() { + CONSOLE_BRIDGE_logDebug("Testing Log"); + return 0; + } + EOS + system ENV.cxx, "test.cpp", "-L#{lib}", "-lconsole_bridge", "-std=c++11", + "-o", "test" + system "./test" + end +end