Skip to content

Instantly share code, notes, and snippets.

@ajshort
Created November 25, 2015 01:02
Show Gist options
  • Save ajshort/15deaee224966234c05f to your computer and use it in GitHub Desktop.
Save ajshort/15deaee224966234c05f to your computer and use it in GitHub Desktop.
class Ompl < Formula
desc "Open Motion Planning Library consists of many motion planning algorithms"
homepage "http://ompl.kavrakilab.org"
url "https://bitbucket.org/ompl/ompl/downloads/ompl-1.0.0-Source.tar.gz"
sha256 "9bb6242ca723ab49b31fc5ac343a580cb7e6229bcf876c503c235f4cdd75376b"
depends_on "cmake" => :build
depends_on "boost"
depends_on "eigen" => :optional
depends_on "ode" => :optional
def install
system "cmake", ".", *std_cmake_args
system "make", "install"
end
test do
(testpath/"test.cpp").write <<-EOS.undent
#include <ompl/base/spaces/RealVectorBounds.h>
#include <cassert>
int main(int argc, char *argv[]) {
ompl::base::RealVectorBounds bounds(3);
bounds.setLow(0);
bounds.setHigh(5);
assert(bounds.getVolume() == 5 * 5 * 5);
}
EOS
system ENV.cc, "test.cpp", "-L#{lib}", "-lompl", "-lstdc++", "-o", "test"
system "./test"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment