GithubHelp home page GithubHelp logo

austinschuh / rules_pcl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kgreenek/rules_pcl

0.0 0.0 0.0 81 KB

Bazel rules for building PCL libraries (PointCloudLibrary)

License: Apache License 2.0

C++ 0.93% Python 46.63% Starlark 52.44%

rules_pcl's Introduction

rules_pcl

Rules for building PCL with bazel.

How to use

In your WORKSPACE.bazel file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_pcl",
    url = "https://github.com/kgreenek/rules_pcl/archive/refs/tags/pcl-1.13.1-v1.tar.gz",
    sha256 = "06d2ed755fbf9ddd30f8bb3ed73f23ee6155d52e742d4e4a278c9458e9a3e17b",
    strip_prefix = "rules_pcl-pcl-1.13.1-v1",
)

load("@rules_pcl//bzl:repositories.bzl", "pcl_repositories")
pcl_repositories()

# NOTE: This must be loaded after the call to pcl_repositories().
load("@rules_pcl//bzl:init_deps.bzl", "pcl_init_deps")
pcl_init_deps()

In your top-level BUILD.bazel file:

load("@rules_pcl//bzl:pcl.bzl", "pcl_config")
pcl_config()

You can customize how pcl is compiled by passing args to the pcl_config() macro, but the defaults will suffice for most. See bzl/pcl.bzl for more info.

To define a target that depends on PCL:

cc_binary(
    name = "example",
    srcs = ["main.cc"],
    deps = ["@pcl//:common"],
)

PCL requires C++14. You can either pass it as an argument to the bazel build command:

bazel build --cxxopt='-std=c++14' //...

Or you can make C++14 the default for all builds by adding this to a file called .bazelrc in your workspace root:

build --cxxopt='-std=c++14'

Or you can update your toolchain to build with C++14.

All sub-modules are currently supported except for the following:

  • cuda
  • gpu
  • outofcore
  • visualization

An example bazel workspace can be found under the //example directory of this repo.

rules_pcl's People

Contributors

curtismuntz avatar franciszhi avatar ian-sixwheel avatar jadnohra avatar kgreenek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.