├── .github └── workflows │ └── ci.yml ├── .gitignore ├── BUILD.bazel ├── LICENSE ├── README.md ├── WORKSPACE ├── bzl ├── BUILD.bazel ├── init_deps.bzl ├── pcl.bzl └── repositories.bzl ├── example ├── .bazelrc ├── .bazelversion ├── BUILD.bazel ├── WORKSPACE └── main.cc ├── gen_test_targets.py └── third_party ├── BUILD.bazel ├── eigen.BUILD ├── flann.BUILD ├── libpng.BUILD ├── lz4.BUILD ├── pcl.BUILD ├── qhull.BUILD └── zlib.BUILD /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | on: [push] 2 | 3 | jobs: 4 | build_x86-64: 5 | name: Build on ubuntu22.04 x86_64 6 | runs-on: ubuntu-22.04 7 | timeout-minutes: 720 8 | 9 | steps: 10 | - uses: actions/checkout@v3.5.3 11 | - run: | 12 | curl -sL https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64 -o /tmp/bazel 13 | chmod 755 /tmp/bazel 14 | cd example 15 | 16 | - run: | 17 | cd example && /tmp/bazel test "@pcl//..." --verbose_failures --show_progress_rate_limit=10 18 | 19 | build_aarch64: 20 | name: Build on ubuntu22.04 aarch64 21 | runs-on: ubuntu-22.04 22 | timeout-minutes: 720 23 | 24 | steps: 25 | - uses: actions/checkout@v3.5.3 26 | - uses: uraimo/run-on-arch-action@v2.5.0 27 | name: Build and run tests on embedded platforms 28 | with: 29 | arch: aarch64 30 | distro: ubuntu22.04 31 | 32 | # Not required, but speeds up builds 33 | githubToken: ${{ github.token }} 34 | 35 | # Install some dependencies in the container. This speeds up builds if 36 | # you are also using githubToken. Any dependencies installed here will 37 | # be part of the container image that gets cached, so subsequent 38 | # builds don't have to re-install them. The image layer is cached 39 | # publicly in your project's package repository, so it is vital that 40 | # no secrets are present in the container state or logs. 41 | install: | 42 | apt-get update -q -y 43 | apt-get install -q -y curl gcc g++ 44 | curl -sL https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-arm64 -o /usr/bin/bazel 45 | chmod 755 /usr/bin/bazel 46 | 47 | run: | 48 | # Only run common lib small tests because the emulated environment is super slow, so 49 | # running the full test suite would timeout after many hours. 50 | cd example 51 | bazel query "kind(cc_.*, @pcl//:*)" | grep common | xargs bazel test --verbose_failures --show_progress_rate_limit=10 --test_size_filters="small" 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bazel-* 2 | -------------------------------------------------------------------------------- /BUILD.bazel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgreenek/rules_pcl/f7e08250e8adbaa873ac4b7579595eefa08bcf8a/BUILD.bazel -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rules_pcl 2 | 3 | Rules for building [PCL](https://github.com/PointCloudLibrary/pcl) with bazel. 4 | 5 | 6 | ## How to use 7 | 8 | In your WORKSPACE.bazel file: 9 | 10 | ``` 11 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 12 | 13 | http_archive( 14 | name = "rules_pcl", 15 | url = "https://github.com/kgreenek/rules_pcl/archive/refs/tags/pcl-1.13.1-v1.tar.gz", 16 | sha256 = "06d2ed755fbf9ddd30f8bb3ed73f23ee6155d52e742d4e4a278c9458e9a3e17b", 17 | strip_prefix = "rules_pcl-pcl-1.13.1-v1", 18 | ) 19 | 20 | load("@rules_pcl//bzl:repositories.bzl", "pcl_repositories") 21 | pcl_repositories() 22 | 23 | # NOTE: This must be loaded after the call to pcl_repositories(). 24 | load("@rules_pcl//bzl:init_deps.bzl", "pcl_init_deps") 25 | pcl_init_deps() 26 | ``` 27 | 28 | In your top-level BUILD.bazel file: 29 | 30 | ``` 31 | load("@rules_pcl//bzl:pcl.bzl", "pcl_config") 32 | pcl_config() 33 | ``` 34 | 35 | You can customize how pcl is compiled by passing args to the pcl_config() macro, but the defaults 36 | will suffice for most. See bzl/pcl.bzl for more info. 37 | 38 | To define a target that depends on PCL: 39 | 40 | ``` 41 | cc_binary( 42 | name = "example", 43 | srcs = ["main.cc"], 44 | deps = ["@pcl//:common"], 45 | ) 46 | ``` 47 | 48 | PCL requires C++14. You can either pass it as an argument to the bazel build command: 49 | 50 | ``` 51 | bazel build --cxxopt='-std=c++14' //... 52 | ``` 53 | 54 | Or you can make C++14 the default for all builds by adding this to a file called `.bazelrc` in your 55 | workspace root: 56 | 57 | ``` 58 | build --cxxopt='-std=c++14' 59 | ``` 60 | 61 | Or you can update your toolchain to build with C++14. 62 | 63 | All sub-modules are currently supported except for the following: 64 | * cuda 65 | * gpu 66 | * outofcore 67 | * visualization 68 | 69 | An example bazel workspace can be found under the //example directory of this repo. 70 | -------------------------------------------------------------------------------- /WORKSPACE: -------------------------------------------------------------------------------- 1 | workspace(name = "rules_pcl") 2 | -------------------------------------------------------------------------------- /bzl/BUILD.bazel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgreenek/rules_pcl/f7e08250e8adbaa873ac4b7579595eefa08bcf8a/bzl/BUILD.bazel -------------------------------------------------------------------------------- /bzl/init_deps.bzl: -------------------------------------------------------------------------------- 1 | # The pcl_repositories() macro from //bzl/repositories.bzl must be invoked before loading this bzl 2 | # file. This is why we have to split this init macro into a separate bzl file. 3 | load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps") 4 | 5 | def pcl_init_deps(): 6 | boost_deps() 7 | -------------------------------------------------------------------------------- /bzl/pcl.bzl: -------------------------------------------------------------------------------- 1 | _PCL_CONFIG_H_TEMPLATE = "@pcl//:pcl_config.h.in" 2 | 3 | _PCL_AARCH64_COMPILER_CONFIG = { 4 | "have_posix_memalign": True, 5 | "have_mm_malloc": False, 6 | "have_sse4_2_extensions": False, 7 | "have_sse4_1_extensions": False, 8 | "have_ssse3_extensions": False, 9 | "have_sse3_extensions": False, 10 | "have_sse2_extensions": False, 11 | "have_sse_extensions": False, 12 | } 13 | 14 | _PCL_DEFAULT_COMPILER_CONFIG = { 15 | "have_posix_memalign": True, 16 | "have_mm_malloc": True, 17 | "have_sse4_2_extensions": True, 18 | "have_sse4_1_extensions": True, 19 | "have_ssse3_extensions": True, 20 | "have_sse3_extensions": True, 21 | "have_sse2_extensions": True, 22 | "have_sse_extensions": True, 23 | } 24 | 25 | def _compiler_config_value(value, kwargs): 26 | # NOTE: __pcl_linux-aarch64 is defined by the pcl_config macro. 27 | default_architecture_value = select({ 28 | ":__pcl_linux-aarch64": _PCL_AARCH64_COMPILER_CONFIG[value], 29 | "//conditions:default": _PCL_DEFAULT_COMPILER_CONFIG[value], 30 | }) 31 | return kwargs.pop(value, default_architecture_value) 32 | 33 | def _cmakedefine_substitutions(*args): 34 | substitutions = {} 35 | for (cmakedefine_str, enabled) in args: 36 | full_cmakedefine_str = "#cmakedefine {}".format(cmakedefine_str) 37 | if enabled: 38 | substitutions[full_cmakedefine_str] = "#define {}".format(cmakedefine_str) 39 | else: 40 | substitutions[full_cmakedefine_str] = "/* #undef {} */".format( 41 | cmakedefine_str.split(" ")[0], 42 | ) 43 | return substitutions 44 | 45 | def _log_level_substitutions(log_level): 46 | valid_log_levels = ["Always", "Error", "Warn", "Info", "Debug", "Verbose"] 47 | if not log_level in valid_log_levels: 48 | fail("log_level ({}) is invalid. Valid options are {}".format(log_level, valid_log_levels)) 49 | return _cmakedefine_substitutions( 50 | ("VERBOSITY_LEVEL_ALWAYS", log_level == "Always"), 51 | ("VERBOSITY_LEVEL_ERROR", log_level == "Error"), 52 | ("VERBOSITY_LEVEL_WARN", log_level == "Warn"), 53 | ("VERBOSITY_LEVEL_INFO", log_level == "Info"), 54 | ("VERBOSITY_LEVEL_DEBUG", log_level == "Debug"), 55 | ("VERBOSITY_LEVEL_VERBOSE", log_level == "Verbose"), 56 | ) 57 | 58 | def _gen_pcl_config_impl(ctx): 59 | version_pretty_str = "{}.{}.{}{}".format( 60 | ctx.attr.version_major, 61 | ctx.attr.version_minor, 62 | ctx.attr.version_patch, 63 | "-dev" if ctx.attr.dev_version else "", 64 | ) 65 | dev_version_str = "1" if ctx.attr.dev_version else "0" 66 | substitutions = { 67 | "@CMAKE_BUILD_TYPE@": ctx.attr.build_type, 68 | "${PCL_VERSION_MAJOR}": ctx.attr.version_major, 69 | "${PCL_VERSION_MINOR}": ctx.attr.version_minor, 70 | "${PCL_VERSION_PATCH}": ctx.attr.version_patch, 71 | "${PCL_DEV_VERSION}": dev_version_str, 72 | "${PCL_VERSION_PRETTY}": version_pretty_str, 73 | "${PCL_INDEX_SIZE}": "32", 74 | "${PCL_INDEX_SIGNED}": "false", 75 | "${PCL_INDEX_SIGNED_STR}": "false", 76 | # TODO(kgreenek): Will this ever need to be different here? 77 | "${VTK_RENDERING_BACKEND_OPENGL_VERSION}": "1", 78 | } 79 | substitutions.update(_log_level_substitutions(ctx.attr.log_level)) 80 | substitutions.update( 81 | _cmakedefine_substitutions( 82 | ("PCL_NO_PRECOMPILE", ctx.attr.no_precompile), 83 | ("PCL_ONLY_CORE_POINT_TYPES", ctx.attr.no_precompile), 84 | ), 85 | ) 86 | substitutions.update( 87 | _cmakedefine_substitutions( 88 | ("HAVE_TBB 1", False), 89 | ("HAVE_OPENNI 1", False), 90 | ("HAVE_OPENNI2 1", False), 91 | ("HAVE_QHULL 1", True), 92 | ("HAVE_QHULL_2011 1", True), 93 | ("HAVE_CUDA 1", False), 94 | ("HAVE_ENSENSO 1", False), 95 | ("HAVE_DAVIDSDK 1", False), 96 | ("HAVE_PNG", True), 97 | ("HAVE_QVTK 1", False), 98 | ("HAVE_FZAPI 1", False), 99 | ), 100 | ) 101 | 102 | # SSE macros. 103 | substitutions.update( 104 | _cmakedefine_substitutions( 105 | ("HAVE_POSIX_MEMALIGN", ctx.attr.have_posix_memalign), 106 | ("HAVE_MM_MALLOC", ctx.attr.have_mm_malloc), 107 | ("HAVE_SSE4_2_EXTENSIONS", ctx.attr.have_sse4_2_extensions), 108 | ("HAVE_SSE4_1_EXTENSIONS", ctx.attr.have_sse4_1_extensions), 109 | ("HAVE_SSSE3_EXTENSIONS", ctx.attr.have_ssse3_extensions), 110 | ("HAVE_SSE3_EXTENSIONS", ctx.attr.have_sse3_extensions), 111 | ("HAVE_SSE2_EXTENSIONS", ctx.attr.have_sse2_extensions), 112 | ("HAVE_SSE_EXTENSIONS", ctx.attr.have_sse_extensions), 113 | ), 114 | ) 115 | substitutions.update( 116 | _cmakedefine_substitutions( 117 | ("OPENGL_IS_A_FRAMEWORK", False), 118 | ("GLUT_IS_A_FRAMEWORK", False), 119 | ), 120 | ) 121 | ctx.actions.expand_template( 122 | template = ctx.file._template, 123 | substitutions = substitutions, 124 | output = ctx.outputs.pcl_config_hdr, 125 | ) 126 | 127 | gen_pcl_config = rule( 128 | implementation = _gen_pcl_config_impl, 129 | attrs = { 130 | "build_type": attr.string(default = "RelWithDebInfo"), 131 | "log_level": attr.string(default = "Info"), 132 | "no_precompile": attr.bool(default = False), 133 | "only_core_point_types": attr.bool(default = False), 134 | "version_major": attr.string(default = "1"), 135 | "version_minor": attr.string(default = "13"), 136 | "version_patch": attr.string(default = "1"), 137 | "dev_version": attr.bool(default = False), 138 | # Compiler config settings. 139 | "have_posix_memalign": attr.bool(default = True), 140 | "have_mm_malloc": attr.bool(default = True), 141 | "have_sse4_2_extensions": attr.bool(default = True), 142 | "have_sse4_1_extensions": attr.bool(default = True), 143 | "have_ssse3_extensions": attr.bool(default = True), 144 | "have_sse3_extensions": attr.bool(default = True), 145 | "have_sse2_extensions": attr.bool(default = True), 146 | "have_sse_extensions": attr.bool(default = True), 147 | "_template": attr.label( 148 | default = Label(_PCL_CONFIG_H_TEMPLATE), 149 | allow_single_file = True, 150 | ), 151 | }, 152 | outputs = {"pcl_config_hdr": "pcl_config.h"}, 153 | ) 154 | 155 | def pcl_library(name, **kwargs): 156 | exclude_srcs = kwargs.pop("exclude_srcs", []) 157 | exclude_hdrs = kwargs.pop("exclude_hdrs", []) 158 | native.cc_library( 159 | name = name, 160 | srcs = native.glob([ 161 | "{}/src/**/*.c".format(name), 162 | "{}/src/**/*.cpp".format(name), 163 | "{}/include/**/*.hpp".format(name), 164 | ], exclude = exclude_srcs), 165 | hdrs = native.glob([ 166 | "{}/include/**/*.h".format(name), 167 | "{}/include/**/*.hh".format(name), 168 | ], exclude = exclude_hdrs), 169 | copts = ["-Wno-unknown-pragmas"], 170 | includes = ["{}/include".format(name)], 171 | visibility = ["//visibility:public"], 172 | **kwargs 173 | ) 174 | 175 | def pcl_config(**kwargs): 176 | native.config_setting( 177 | name = "__pcl_linux-aarch64", 178 | constraint_values = [ 179 | "@platforms//os:linux", 180 | "@platforms//cpu:aarch64", 181 | ], 182 | ) 183 | gen_pcl_config( 184 | name = "__pcl_gen_pcl_config", 185 | have_posix_memalign = _compiler_config_value("have_posix_memalign", kwargs), 186 | have_mm_malloc = _compiler_config_value("have_mm_malloc", kwargs), 187 | have_sse4_2_extensions = _compiler_config_value("have_sse4_2_extensions", kwargs), 188 | have_sse4_1_extensions = _compiler_config_value("have_sse4_1_extensions", kwargs), 189 | have_ssse3_extensions = _compiler_config_value("have_ssse3_extensions", kwargs), 190 | have_sse3_extensions = _compiler_config_value("have_sse3_extensions", kwargs), 191 | have_sse2_extensions = _compiler_config_value("have_sse2_extensions", kwargs), 192 | have_sse_extensions = _compiler_config_value("have_sse_extensions", kwargs), 193 | **kwargs 194 | ) 195 | native.cc_library( 196 | name = "pcl_config", 197 | hdrs = [":__pcl_gen_pcl_config"], 198 | include_prefix = "pcl", 199 | visibility = ["//visibility:public"], 200 | ) 201 | -------------------------------------------------------------------------------- /bzl/repositories.bzl: -------------------------------------------------------------------------------- 1 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 2 | load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") 3 | 4 | def pcl_repositories(): 5 | # Latest commit as of: Dec 23, 2023 6 | # NOTE: We cannot update beyond this commit without breaking aarch64 support due to lzma. 7 | # See: https://github.com/nelhage/rules_boost/issues/374 8 | maybe( 9 | http_archive, 10 | name = "com_github_nelhage_rules_boost", 11 | sha256 = "490d11425393eed068966a4990ead1ff07c658f823fd982fddac67006ccc44ab", 12 | strip_prefix = "rules_boost-57c99395e15720e287471d79178d36a85b64d6f6", 13 | urls = ["https://github.com/nelhage/rules_boost/archive/57c99395e15720e287471d79178d36a85b64d6f6.tar.gz"], 14 | ) 15 | 16 | maybe( 17 | http_archive, 18 | name = "com_google_googletest", 19 | sha256 = "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7", 20 | strip_prefix = "googletest-1.14.0", 21 | urls = ["https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz"], 22 | ) 23 | 24 | maybe( 25 | http_archive, 26 | name = "eigen", 27 | build_file = "@rules_pcl//third_party:eigen.BUILD", 28 | sha256 = "8586084f71f9bde545ee7fa6d00288b264a2b7ac3607b974e54d13e7162c1c72", 29 | strip_prefix = "eigen-3.4.0", 30 | urls = ["https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz"], 31 | ) 32 | 33 | maybe( 34 | http_archive, 35 | name = "flann", 36 | build_file = "@rules_pcl//third_party:flann.BUILD", 37 | sha256 = "e26829bb0017f317d9cc45ab83ddcb8b16d75ada1ae07157006c1e7d601c8824", 38 | strip_prefix = "flann-1.9.2", 39 | urls = ["https://github.com/flann-lib/flann/archive/refs/tags/1.9.2.tar.gz"], 40 | ) 41 | 42 | maybe( 43 | http_archive, 44 | name = "lz4", 45 | build_file = "@rules_pcl//third_party:lz4.BUILD", 46 | sha256 = "0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b", 47 | strip_prefix = "lz4-1.9.4", 48 | urls = ["https://github.com/lz4/lz4/archive/refs/tags/v1.9.4.tar.gz"], 49 | ) 50 | 51 | maybe( 52 | http_archive, 53 | name = "net_zlib_zlib", 54 | sha256 = "6d4d6640ca3121620995ee255945161821218752b551a1a180f4215f7d124d45", 55 | build_file = "@rules_pcl//third_party:zlib.BUILD", 56 | strip_prefix = "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f", 57 | urls = [ 58 | "https://mirror.bazel.build/github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz", 59 | "https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz", 60 | ], 61 | ) 62 | 63 | maybe( 64 | http_archive, 65 | name = "org_libpng_libpng", 66 | build_file = "@rules_pcl//third_party:libpng.BUILD", 67 | sha256 = "7f415186d38ca71c23058386d7cf5135c8beda821ee1beecdc2a7a26c0356615", 68 | strip_prefix = "libpng-1.2.57", 69 | urls = [ 70 | "https://github.com/glennrp/libpng/archive/v1.2.57.tar.gz", 71 | "https://mirror.bazel.build/github.com/glennrp/libpng/archive/v1.2.57.tar.gz", 72 | ], 73 | ) 74 | 75 | maybe( 76 | http_archive, 77 | name = "pcl", 78 | sha256 = "8ab98a9db371d822de0859084a375a74bdc7f31c96d674147710cf4101b79621", 79 | build_file = "@rules_pcl//third_party:pcl.BUILD", 80 | strip_prefix = "pcl-pcl-1.13.1", 81 | urls = ["https://github.com/PointCloudLibrary/pcl/archive/refs/tags/pcl-1.13.1.tar.gz"], 82 | ) 83 | 84 | maybe( 85 | http_archive, 86 | name = "qhull", 87 | build_file = "@rules_pcl//third_party:qhull.BUILD", 88 | sha256 = "cf7235b76244595a86b9407b906e3259502b744528318f2178155e5899d6cf9f", 89 | strip_prefix = "qhull-2019.1", 90 | urls = ["https://github.com/qhull/qhull/archive/2019.1.tar.gz"], 91 | ) 92 | -------------------------------------------------------------------------------- /example/.bazelrc: -------------------------------------------------------------------------------- 1 | # Helpful flags: https://blog.aspect.dev/bazelrc-flags 2 | 3 | # Build in release mode with debug symbols by default. 4 | # These are disabled for quicker build-times in CI, but in your code you almost definitely want to 5 | # set -c opt. 6 | #build --compilation_mode opt 7 | #build --copt -g 8 | 9 | build --keep_going 10 | # Fix the wrong default to generate __init__.py to delimit a Python package. 11 | build --incompatible_default_to_explicit_init_py 12 | build --cxxopt='-std=c++17' 13 | # Ensure that you don't accidentally make non-hermetic actions/tests 14 | # which depend on remote services. Tag an individual target with 15 | # tags=["requires-network"] to opt-out of the enforcement. 16 | build --sandbox_default_allow_network=false 17 | # Don't let environment variables like $PATH sneak into the build, 18 | # which can cause massive cache misses when they change. 19 | build --incompatible_strict_action_env 20 | # Helps debugging when Bazel runs out of memory 21 | build --heap_dump_on_oom 22 | # Speed up all builds by not checking if output files have been modified. 23 | build --noexperimental_check_output_files 24 | 25 | build --nolegacy_external_runfiles 26 | run --nolegacy_external_runfiles 27 | test --nolegacy_external_runfiles 28 | 29 | test --test_output=errors 30 | -------------------------------------------------------------------------------- /example/.bazelversion: -------------------------------------------------------------------------------- 1 | 6.2.1 2 | -------------------------------------------------------------------------------- /example/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_pcl//bzl:pcl.bzl", "pcl_config") 2 | 3 | # Example on how to customize the configuration: 4 | # pcl_config(have_mm_malloc=False) 5 | pcl_config() 6 | 7 | cc_binary( 8 | name = "example", 9 | srcs = ["main.cc"], 10 | deps = ["@pcl//:common"], 11 | ) 12 | -------------------------------------------------------------------------------- /example/WORKSPACE: -------------------------------------------------------------------------------- 1 | workspace(name = "rules_pcl_example") 2 | 3 | # In your WORKSPACE file, you'll make this an http_archive instead. See README.md. 4 | local_repository( 5 | name = "rules_pcl", 6 | path = "..", 7 | ) 8 | 9 | load("@rules_pcl//bzl:repositories.bzl", "pcl_repositories") 10 | pcl_repositories() 11 | 12 | # NOTE: This must be loaded after the call to pcl_repositories(). 13 | load("@rules_pcl//bzl:init_deps.bzl", "pcl_init_deps") 14 | pcl_init_deps() 15 | -------------------------------------------------------------------------------- /example/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "pcl/point_cloud.h" 4 | #include "pcl/point_types.h" 5 | 6 | int main(int argc, const char **argv) { 7 | pcl::PointCloud point_cloud; 8 | std::cout << "SUCCESS!" << std::endl; 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /gen_test_targets.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import argparse 3 | import os 4 | 5 | EXCLUDE_TESTS = { 6 | # This test seems to genuinely fail and I don't know why. Disable it for now. 7 | # TODO(kgreenek): Figure out why this is failing and whether it is related to the bazel rules. 8 | "2d": ["test_2d"], 9 | # This test has internal timeout testing that cannot be increased. Just disable it to prevent it 10 | # from causing non-deterministic timing failures. 11 | "filters": ["test_filters_sampling"], 12 | # This test loads a file in code using an env var rather than taking an argument. 13 | "geometry": ["test_mesh_io"], 14 | "io": [ 15 | # This test depends on VTK. 16 | "test_ply_mesh_io", 17 | # This test depends on a directory that doesn't appear to exist. 18 | "test_tim_grabber", 19 | ], 20 | # This test has internal timeout testing that cannot be increased. It fails in CI on the aarch64 21 | # target because it's running in an enumlated environment (so everything runs 5x slower than 22 | # normal). Just disable it to prevent it from causing non-deterministic timing failures. 23 | "sample_consensus": ["test_sample_consensus"], 24 | } 25 | 26 | MEDIUM_TESTS = { 27 | "io": ["test_io"], 28 | "registration": ["test_kfpcs_ia", "test_registration"], 29 | "surface": 30 | ["test_convex_hull", "test_grid_projection", "test_marching_cubes"], 31 | } 32 | LARGE_TESTS = { 33 | "common": ["test_eigen"], 34 | "features": 35 | ["test_ii_normals", "test_pfh_estimation", "test_rops_estimation"], 36 | # NOTE: The below tests only take a long time when running in CI's aarch64 emulated environment. 37 | "filters": ["test_crop_hull", "test_filters_bilateral"], 38 | "octree": ["test_test_octree"], 39 | "search": ["test_flann_search", "test_kdtree_search", "test_search"], 40 | } 41 | 42 | RENAME_DEPS = { 43 | ":gtest": ":test", 44 | "FLANN::FLANN": "@flann", 45 | } 46 | 47 | EXTRA_SRCS = { 48 | "geometry": { 49 | "all": ["test/geometry/test_mesh_common_functions.h"], 50 | }, 51 | "search": { 52 | "all": ["test/search/precise_distances.h"], 53 | }, 54 | } 55 | 56 | # These targets are missing required deps, which works with cmake but not bazel. 57 | EXTRA_DEPS = { 58 | "2d": { 59 | "test_2d": [":2d"], 60 | "test_2d_keypoint_instantiation_with_precompile": [":2d"], 61 | "test_2d_keypoint_instantiation_without_precompile": [":2d"], 62 | }, 63 | "io": { 64 | "test_buffers": [":io"] 65 | }, 66 | "octree": { 67 | "test_octree": [":octree"], 68 | }, 69 | "registration": { 70 | "test_correspondence_estimation": [":io"], 71 | }, 72 | } 73 | 74 | PARSER_STATE_NONE = "NONE" 75 | PARSER_STATE_TEST_NAME = "TEST_NAME" 76 | PARSER_STATE_SRCS = "SRCS" 77 | PARSER_STATE_DEPS = "DEPS" 78 | PARSER_STATE_ARGS = "ARGS" 79 | 80 | 81 | def parse_args() -> tuple[list[str], any]: 82 | parser = argparse.ArgumentParser( 83 | description="Generates bazel BUILD targets for test targets") 84 | parser.add_argument("--pcl_path", help="Path to the local pcl source code") 85 | parser.add_argument("--pcl_lib", 86 | help="The pcl library to generate tests for") 87 | parser.add_argument("--out", "-o", help="Path to the output BUILD file") 88 | return parser.parse_args() 89 | 90 | 91 | def main(): 92 | args = parse_args() 93 | test_lib_path = os.path.join(args.pcl_path, "test", args.pcl_lib) 94 | cmakelists_path = os.path.join(test_lib_path, "CMakeLists.txt") 95 | with open(cmakelists_path) as cmakelists_file: 96 | with open(args.out, "w") as out_file: 97 | parser_state = PARSER_STATE_NONE 98 | test_name = None 99 | srcs = [] 100 | deps = [] 101 | arguments = [] 102 | data = [] 103 | target_complete = False 104 | for line in cmakelists_file: 105 | line = line.strip() 106 | # Example line defining a test: 107 | # PCL_ADD_TEST(common_test_wrappers test_wrappers FILES test_wrappers.cpp LINK_WITH pcl_gtest pcl_common) 108 | words = line.split() 109 | word_index = 0 110 | if parser_state == PARSER_STATE_NONE: 111 | if not line.startswith("PCL_ADD_TEST"): 112 | continue 113 | # Handle spurious whitespace like "PCL_ADD_TEST (foo ...". 114 | test_line_parts = line.split("(") 115 | assert (len(test_line_parts) == 2) 116 | words = test_line_parts[1].split() 117 | test_name = words[1] 118 | parser_state = PARSER_STATE_SRCS 119 | print(test_name) 120 | word_index = 2 121 | 122 | while word_index < len(words): 123 | word = words[word_index] 124 | if word == "FILES": 125 | parser_state = PARSER_STATE_SRCS 126 | word_index += 1 127 | continue 128 | if word == "LINK_WITH": 129 | parser_state = PARSER_STATE_DEPS 130 | word_index += 1 131 | continue 132 | if word == "ARGUMENTS": 133 | parser_state = PARSER_STATE_ARGS 134 | word_index += 1 135 | continue 136 | 137 | if word.endswith(")"): 138 | target_complete = True 139 | word = word.rstrip(")").strip() 140 | 141 | if parser_state == PARSER_STATE_SRCS: 142 | srcs.append(os.path.join("test", args.pcl_lib, word)) 143 | elif parser_state == PARSER_STATE_DEPS: 144 | dep = word.replace("pcl_", ":") 145 | if dep in RENAME_DEPS: 146 | dep = RENAME_DEPS[dep] 147 | deps.append(dep) 148 | elif parser_state == PARSER_STATE_ARGS: 149 | # Example: "['${PCL_SOURCE_DIR}/test/bun0.pcd', '${PCL_SOURCE_DIR}/test/bun4.pcd']" 150 | new_arguments_words = word.split(",") 151 | for new_argument_word in new_arguments_words: 152 | new_argument_word = new_argument_word \ 153 | .strip('"').strip("'").lstrip("[").rstrip("]").strip("'").strip('"') 154 | argument = new_argument_word.replace( 155 | "${PCL_SOURCE_DIR}", "../pcl") 156 | arguments.append(argument) 157 | new_data = new_argument_word.lstrip( 158 | "${PCL_SOURCE_DIR}/pcl/") 159 | data.append(new_data) 160 | 161 | if target_complete: 162 | if args.pcl_lib in EXCLUDE_TESTS and test_name in EXCLUDE_TESTS[ 163 | args.pcl_lib]: 164 | print( 165 | f"WARNING: Skipping excluded test {test_name}") 166 | else: 167 | if args.pcl_lib in EXTRA_SRCS: 168 | if "all" in EXTRA_SRCS[args.pcl_lib]: 169 | for extra_src in EXTRA_SRCS[ 170 | args.pcl_lib]["all"]: 171 | if extra_src not in srcs: 172 | srcs.append(extra_src) 173 | if test_name in EXTRA_SRCS[args.pcl_lib]: 174 | srcs.extend( 175 | EXTRA_SRCS[args.pcl_lib][test_name]) 176 | if args.pcl_lib in EXTRA_DEPS and test_name in EXTRA_DEPS[ 177 | args.pcl_lib]: 178 | deps.extend( 179 | EXTRA_DEPS[args.pcl_lib][test_name]) 180 | srcs.sort() 181 | deps.sort() 182 | arguments.sort() 183 | data.sort() 184 | size = "small" 185 | if args.pcl_lib in LARGE_TESTS and test_name in LARGE_TESTS[ 186 | args.pcl_lib]: 187 | size = "large" 188 | elif args.pcl_lib in MEDIUM_TESTS and test_name in MEDIUM_TESTS[ 189 | args.pcl_lib]: 190 | size = "medium" 191 | out_file.write("cc_test(\n") 192 | out_file.write( 193 | f" name = \"{args.pcl_lib}_{test_name}\",\n" 194 | ) 195 | out_file.write(f" size = \"{size}\",\n") 196 | if len(srcs) == 1: 197 | out_file.write( 198 | f" srcs = [\"{srcs[0]}\"],\n") 199 | else: 200 | out_file.write(" srcs = [\n") 201 | for src in srcs: 202 | out_file.write(f" \"{src}\",\n") 203 | out_file.write(" ],\n") 204 | if len(arguments) > 0: 205 | if len(arguments) == 1: 206 | out_file.write( 207 | f" args = [\"{arguments[0]}\"],\n") 208 | else: 209 | out_file.write(" args = [\n") 210 | for argument in arguments: 211 | out_file.write( 212 | f" \"{argument}\",\n") 213 | out_file.write(" ],\n") 214 | if len(data) > 0: 215 | if len(data) == 1: 216 | out_file.write( 217 | f" data = [\"{data[0]}\"],\n") 218 | else: 219 | out_file.write(" data = [\n") 220 | for data_value in data: 221 | out_file.write( 222 | f" \"{data_value}\",\n") 223 | out_file.write(" ],\n") 224 | if len(deps) == 1: 225 | out_file.write( 226 | f" deps = [\"{deps[0]}\"],\n") 227 | else: 228 | out_file.write(" deps = [\n") 229 | for dep in deps: 230 | out_file.write(f" \"{dep}\",\n") 231 | out_file.write(" ],\n") 232 | out_file.write(")\n") 233 | out_file.write("\n") 234 | 235 | # Reset state 236 | parser_state = PARSER_STATE_NONE 237 | test_name = None 238 | srcs = [] 239 | deps = [] 240 | arguments = [] 241 | data = [] 242 | target_complete = False 243 | 244 | # Ignore the rest of the line. 245 | break 246 | 247 | word_index += 1 248 | 249 | 250 | if __name__ == "__main__": 251 | main() 252 | -------------------------------------------------------------------------------- /third_party/BUILD.bazel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kgreenek/rules_pcl/f7e08250e8adbaa873ac4b7579595eefa08bcf8a/third_party/BUILD.bazel -------------------------------------------------------------------------------- /third_party/eigen.BUILD: -------------------------------------------------------------------------------- 1 | # Description: 2 | # Eigen is a C++ template library for linear algebra: vectors, 3 | # matrices, and related algorithms. 4 | 5 | licenses([ 6 | # Note: Eigen is an MPL2 library that includes GPL v3 and LGPL v2.1+ code. 7 | # We've taken special care to not reference any restricted code. 8 | "reciprocal", # MPL2 9 | "notice", # Portions BSD 10 | ]) 11 | 12 | exports_files(["COPYING.MPL2"]) 13 | 14 | EIGEN_FILES = [ 15 | "Eigen/**", 16 | "unsupported/Eigen/**", 17 | ] 18 | 19 | # Non MPL2 files 20 | EIGEN_RESTRICTED_FILES = [ 21 | "unsupported/Eigen/src/IterativeSolvers/IterationController.h", 22 | "unsupported/Eigen/src/IterativeSolvers/ConstrainedConjGrad.h", 23 | ] 24 | 25 | EIGEN_MPL2_HEADER_FILES = glob( 26 | EIGEN_FILES, 27 | exclude = EIGEN_RESTRICTED_FILES, 28 | ) 29 | 30 | cc_library( 31 | name = "eigen", 32 | hdrs = EIGEN_MPL2_HEADER_FILES, 33 | defines = ["EIGEN_MPL2_ONLY"], 34 | includes = ["."], 35 | visibility = ["//visibility:public"], 36 | ) 37 | -------------------------------------------------------------------------------- /third_party/flann.BUILD: -------------------------------------------------------------------------------- 1 | licenses(["notice"]) # BSD 3-Clause 2 | 3 | # Do not support cuda for now. 4 | FLANN_CUDA_HDRS = [ 5 | "cpp/flann/algorithms/kdtree_cuda_3d_index.h", 6 | "cpp/flann/algorithms/kdtree_cuda_builder.h", 7 | "cpp/flann/util/cutil_math.h", 8 | ] 9 | 10 | cc_library( 11 | name = "flann", 12 | hdrs = glob( 13 | [ 14 | "src/cpp/flann/*.h", 15 | "src/cpp/flann/*.hpp", 16 | "src/cpp/flann/algorithms/*.h", 17 | "src/cpp/flann/nn/*.h", 18 | "src/cpp/flann/util/*.h", 19 | ], 20 | exclude = FLANN_CUDA_HDRS, 21 | ), 22 | strip_include_prefix = "src/cpp", 23 | visibility = ["//visibility:public"], 24 | deps = [ 25 | "@lz4", 26 | "@lz4//:lz4_hc", 27 | ], 28 | ) 29 | -------------------------------------------------------------------------------- /third_party/libpng.BUILD: -------------------------------------------------------------------------------- 1 | # Description: 2 | # libpng is the official PNG reference library. 3 | 4 | licenses(["notice"]) # BSD/MIT-like license 5 | 6 | cc_library( 7 | name = "libpng", 8 | srcs = [ 9 | "png.c", 10 | "pngerror.c", 11 | "pngget.c", 12 | "pngmem.c", 13 | "pngpread.c", 14 | "pngread.c", 15 | "pngrio.c", 16 | "pngrtran.c", 17 | "pngrutil.c", 18 | "pngset.c", 19 | "pngtrans.c", 20 | "pngwio.c", 21 | "pngwrite.c", 22 | "pngwtran.c", 23 | "pngwutil.c", 24 | ], 25 | hdrs = [ 26 | "png.h", 27 | "pngconf.h", 28 | ], 29 | includes = ["."], 30 | linkopts = ["-lm"], 31 | visibility = ["//visibility:public"], 32 | deps = ["@net_zlib_zlib//:zlib"], 33 | ) 34 | -------------------------------------------------------------------------------- /third_party/lz4.BUILD: -------------------------------------------------------------------------------- 1 | """Bazel BUILD file for lz4.""" 2 | 3 | licenses(["notice"]) # BSD 2-Clause 4 | 5 | cc_library( 6 | name = "lz4", 7 | srcs = [ 8 | "lib/lz4.c", 9 | "lib/xxhash.c", 10 | "lib/xxhash.h", 11 | ], 12 | hdrs = [ 13 | "lib/lz4.h", 14 | ], 15 | strip_include_prefix = "lib/", 16 | visibility = ["//visibility:public"], 17 | ) 18 | 19 | cc_library( 20 | name = "lz4_hc", 21 | srcs = [ 22 | "lib/lz4hc.c", 23 | ], 24 | hdrs = [ 25 | "lib/lz4hc.h", 26 | ], 27 | strip_include_prefix = "lib/", 28 | visibility = ["//visibility:public"], 29 | deps = [ 30 | ":lz4", 31 | ":lz4_lz4c_include", 32 | ], 33 | ) 34 | 35 | cc_library( 36 | name = "lz4_frame", 37 | srcs = [ 38 | "lib/lz4frame.c", 39 | "lib/lz4frame_static.h", 40 | ], 41 | hdrs = [ 42 | "lib/lz4frame.h", 43 | ], 44 | strip_include_prefix = "lib/", 45 | visibility = ["//visibility:public"], 46 | deps = [ 47 | ":lz4", 48 | ":lz4_hc", 49 | ], 50 | ) 51 | 52 | cc_library( 53 | name = "lz4_lz4c_include", 54 | hdrs = [ 55 | "lib/lz4.c", 56 | ], 57 | strip_include_prefix = "lib/", 58 | ) 59 | -------------------------------------------------------------------------------- /third_party/pcl.BUILD: -------------------------------------------------------------------------------- 1 | # Description: 2 | # Point Cloud Library (PCL) pointclouds.org 3 | 4 | load("@rules_pcl//bzl:pcl.bzl", "pcl_library") 5 | 6 | licenses(["notice"]) # BSD 3-Clause 7 | 8 | exports_files(["pcl_config.h.in"]) 9 | 10 | pcl_library( 11 | name = "2d", 12 | exclude_srcs = ["2d/src/examples.cpp"], 13 | deps = [ 14 | ":common", 15 | ":filters", 16 | ], 17 | ) 18 | 19 | pcl_library( 20 | name = "common", 21 | deps = [ 22 | "@//:pcl_config", 23 | "@boost//:algorithm", 24 | "@boost//:current_function", 25 | "@boost//:filesystem", 26 | "@boost//:fusion", 27 | "@boost//:mpl", 28 | "@boost//:predef", 29 | "@boost//:preprocessor", 30 | "@boost//:signals2", 31 | "@eigen", 32 | ], 33 | ) 34 | 35 | pcl_library( 36 | name = "features", 37 | deps = [ 38 | ":2d", 39 | ":common", 40 | ":filters", 41 | ":kdtree", 42 | ":octree", 43 | ":search", 44 | "@boost//:graph", 45 | "@boost//:property_map", 46 | "@eigen", 47 | ], 48 | ) 49 | 50 | pcl_library( 51 | name = "filters", 52 | deps = [ 53 | ":common", 54 | ":kdtree", 55 | ":octree", 56 | ":sample_consensus", 57 | ":search", 58 | "@//:pcl_config", 59 | "@boost//:dynamic_bitset", 60 | "@boost//:fusion", 61 | "@boost//:mpl", 62 | "@boost//:optional", 63 | "@boost//:random", 64 | "@boost//:sort", 65 | "@eigen", 66 | ], 67 | ) 68 | 69 | pcl_library( 70 | name = "geometry", 71 | deps = [ 72 | ":common", 73 | "@boost//:operators", 74 | "@boost//:version", 75 | "@eigen", 76 | ], 77 | ) 78 | 79 | pcl_library( 80 | name = "ml", 81 | deps = [":common"], 82 | ) 83 | 84 | # TODO(kgreenek): This one is going to be hard because it depends on a lot of the external 85 | # dependencies above that aren't supported yet. For now, just exclude everything that has external 86 | # dependencies. We'll probably need a macro to set the dependencies based on what external 87 | # dependencies the user has enabled via the call to pcl_config. Alternatively, we may be able to 88 | # break this out into a bunch of individual targets that can be selectively created / enabled in the 89 | # pcl_config macro. 90 | 91 | # Depends on David SDK and VTK. 92 | IO_DAVIDSDK_SRCS = ["io/src/davidsdk_grabber.cpp"] 93 | 94 | IO_DAVIDSDK_HDRS = ["io/include/pcl/io/davidsdk_grabber.h"] 95 | 96 | IO_DEPTH_SENSE_SRCS = [ 97 | "io/src/depth_sense/**", 98 | "io/src/depth_sense_grabber.cpp", 99 | ] 100 | 101 | IO_DEPTH_SENSE_HDRS = [ 102 | "io/include/pcl/io/depth_sense/**", 103 | "io/include/pcl/io/depth_sense_grabber.h", 104 | ] 105 | 106 | # NOTE: These only depend on libusb-1.0. 107 | IO_DINAST_SRCS = ["io/src/dinast_grabber.cpp"] 108 | 109 | IO_DINAST_HDRS = ["io/include/pcl/io/dinast_grabber.h"] 110 | 111 | IO_ENSENSO_SRCS = ["io/src/ensenso_grabber.cpp"] 112 | 113 | IO_ENSENSO_HDRS = ["io/include/pcl/io/ensenso_grabber.h"] 114 | 115 | IO_OPENNI_SRCS = [ 116 | "io/src/oni_grabber.cpp", 117 | "io/src/openni_camera/**", 118 | "io/src/openni_grabber.cpp", 119 | ] 120 | 121 | IO_OPENNI_HDRS = [ 122 | "io/include/pcl/io/oni_grabber.h", 123 | "io/include/pcl/io/openni_camera/**", 124 | "io/include/pcl/io/openni_grabber.h", 125 | ] 126 | 127 | IO_OPENNI2_SRCS = [ 128 | "io/src/openni2/**", 129 | "io/src/openni2_grabber.cpp", 130 | ] 131 | 132 | IO_OPENNI2_HDRS = [ 133 | "io/include/pcl/io/openni2/**", 134 | "io/include/pcl/io/openni2_grabber.h", 135 | ] 136 | 137 | IO_REAL_SENSE_SRCS = [ 138 | "io/src/real_sense/**", 139 | "io/src/real_sense_grabber.cpp", 140 | ] 141 | 142 | IO_REAL_SENSE_HDRS = [ 143 | "io/include/pcl/io/real_sense/**", 144 | "io/include/pcl/io/real_sense_grabber.h", 145 | ] 146 | 147 | IO_REAL_SENSE_2_SRCS = ["io/src/real_sense_2_grabber.cpp"] 148 | 149 | IO_REAL_SENSE_2_HDRS = ["io/include/pcl/io/real_sense_2_grabber.h"] 150 | 151 | IO_VTK_SRCS = [ 152 | "io/src/png_io.cpp", 153 | "io/src/vtk_lib_io.cpp", 154 | ] 155 | 156 | IO_VTK_HDRS = [ 157 | "io/include/pcl/io/impl/vtk_lib_io.hpp", 158 | "io/include/pcl/io/png_io.h", 159 | "io/include/pcl/io/vtk_lib_io.h", 160 | ] 161 | 162 | pcl_library( 163 | name = "io", 164 | exclude_hdrs = 165 | IO_DAVIDSDK_HDRS + 166 | IO_DEPTH_SENSE_HDRS + 167 | IO_DINAST_HDRS + 168 | IO_ENSENSO_HDRS + 169 | IO_OPENNI_HDRS + 170 | IO_OPENNI2_HDRS + 171 | IO_REAL_SENSE_HDRS + 172 | IO_REAL_SENSE_2_HDRS + 173 | IO_VTK_HDRS, 174 | exclude_srcs = 175 | IO_DAVIDSDK_SRCS + 176 | IO_DEPTH_SENSE_SRCS + 177 | IO_DINAST_SRCS + 178 | IO_ENSENSO_SRCS + 179 | IO_OPENNI_SRCS + 180 | IO_OPENNI2_SRCS + 181 | IO_REAL_SENSE_SRCS + 182 | IO_REAL_SENSE_2_SRCS + 183 | IO_VTK_SRCS, 184 | deps = [ 185 | ":common", 186 | ":octree", 187 | "@//:pcl_config", 188 | "@boost//:algorithm", 189 | "@boost//:array", 190 | "@boost//:asio", 191 | "@boost//:circular_buffer", 192 | "@boost//:core", 193 | "@boost//:filesystem", 194 | "@boost//:foreach", 195 | "@boost//:format", 196 | "@boost//:interprocess", 197 | "@boost//:iostreams", 198 | "@boost//:lexical_cast", 199 | "@boost//:math", 200 | "@boost//:mpl", 201 | "@boost//:multiprecision", # See: https://github.com/kgreenek/rules_pcl/issues/4 202 | "@boost//:numeric_conversion", 203 | "@boost//:predef", 204 | "@boost//:property_tree", 205 | "@boost//:signals2", 206 | "@boost//:smart_ptr", 207 | "@boost//:tokenizer", 208 | "@boost//:utility", 209 | "@boost//:version", 210 | "@org_libpng_libpng//:libpng", 211 | ], 212 | ) 213 | 214 | pcl_library( 215 | name = "kdtree", 216 | deps = [ 217 | ":common", 218 | "@flann", 219 | ], 220 | ) 221 | 222 | pcl_library( 223 | name = "keypoints", 224 | deps = [ 225 | ":common", 226 | ":features", 227 | ":filters", 228 | ":octree", 229 | ":search", 230 | "@//:pcl_config", 231 | "@eigen", 232 | ], 233 | ) 234 | 235 | pcl_library( 236 | name = "octree", 237 | deps = [ 238 | ":common", 239 | "@boost//:graph", 240 | ], 241 | ) 242 | 243 | # TODO(kgreenek): Finish this once the visualization lib is done. 244 | #pcl_library( 245 | # name = "outofcore", 246 | # exclude_srcs = ["outofcore/src/visualization/**"], 247 | # exclude_hdrs = ["outofcore/include/pcl/outofcore/visualization/**"], 248 | # deps = [ 249 | # ":common", 250 | # ":filters", 251 | # ":io", 252 | # ":octree", 253 | # ":visualization", 254 | # "@boost//:filesystem", 255 | # "@boost//:foreach", 256 | # "@boost//:random", 257 | # "@boost//:uuid", 258 | # ], 259 | #) 260 | # 261 | #cc_binary( 262 | # name = "outofcore_print", 263 | # srcs = ["outofcore/tools/outofcore_print.cpp"], 264 | # deps = [ 265 | # ":outofcore", 266 | # "@boost//:accumulators", 267 | # "@boost//:algorithm", 268 | # "@boost//:foreach", 269 | # ], 270 | #) 271 | # 272 | #cc_binary( 273 | # name = "outofcore_process", 274 | # srcs = ["outofcore/tools/outofcore_process.cpp"], 275 | # deps = [ 276 | # ":common", 277 | # ":io", 278 | # ":outofcore", 279 | # "@boost//:foreach", 280 | # ], 281 | #) 282 | # 283 | #cc_binary( 284 | # name = "outofcore_viewer", 285 | # srcs = ["outofcore/tools/outofcore_viewer.cpp"], 286 | # deps = [ 287 | # ":common", 288 | # ":io", 289 | # ":outofcore", 290 | # ":visualization", 291 | # "@boost//:filesystem", 292 | # ], 293 | #) 294 | 295 | pcl_library( 296 | name = "people", 297 | # This file depends on ":visualization". 298 | exclude_hdrs = ["include/pcl/people/person_cluster.h"], 299 | deps = [ 300 | ":common", 301 | ":filters", 302 | ":kdtree", 303 | ":sample_consensus", 304 | ":segmentation", 305 | #":visualization", 306 | ], 307 | ) 308 | 309 | pcl_library( 310 | name = "recognition", 311 | deps = [ 312 | ":common", 313 | ":features", 314 | ":filters", 315 | ":io", 316 | ":kdtree", 317 | ":ml", 318 | ":registration", 319 | ":search", 320 | "@boost//:algorithm", 321 | "@boost//:filesystem", 322 | "@boost//:graph", 323 | "@boost//:random", 324 | "@eigen", 325 | ], 326 | ) 327 | 328 | pcl_library( 329 | name = "registration", 330 | exclude_hdrs = ["registration/include/pcl/registration/transformation_estimation_dq.h"], 331 | exclude_srcs = [ 332 | "registration/include/pcl/registration/impl/transformation_estimation_dq.hpp", 333 | "registration/src/pairwise_graph_registration.cpp", 334 | "registration/src/transformation_estimation_dq.cpp", 335 | ], 336 | deps = [ 337 | ":common", 338 | ":features", 339 | ":filters", 340 | ":kdtree", 341 | ":sample_consensus", 342 | ":search", 343 | "@boost//:core", 344 | "@boost//:graph", 345 | "@boost//:noncopyable", 346 | "@boost//:property_map", 347 | "@boost//:smart_ptr", 348 | "@eigen", 349 | ], 350 | ) 351 | 352 | pcl_library( 353 | name = "sample_consensus", 354 | deps = [ 355 | ":common", 356 | ":search", 357 | "@//:pcl_config", 358 | "@boost//:math", 359 | "@boost//:multiprecision", # See: https://github.com/kgreenek/rules_pcl/issues/4 360 | "@boost//:random", 361 | "@eigen", 362 | ], 363 | ) 364 | 365 | pcl_library( 366 | name = "segmentation", 367 | deps = [ 368 | ":common", 369 | ":features", 370 | ":filters", 371 | ":geometry", 372 | ":ml", 373 | ":octree", 374 | ":sample_consensus", 375 | ":search", 376 | "@boost//:bimap", 377 | "@boost//:concept", 378 | "@boost//:graph", 379 | "@boost//:multi_array", 380 | "@boost//:ptr_container", 381 | "@boost//:version", 382 | "@eigen", 383 | "@flann", 384 | ], 385 | ) 386 | 387 | pcl_library( 388 | name = "stereo", 389 | deps = [ 390 | ":common", 391 | ":io", 392 | ], 393 | ) 394 | 395 | SURFACE_ON_NURBS_SRCS = [ 396 | "surface/src/3rdparty/opennurbs/**", 397 | "surface/src/on_nurbs/**", 398 | ] 399 | 400 | SURFACE_ON_NURBS_HDRS = [ 401 | "surface/include/pcl/surface/3rdparty/opennurbs", 402 | "surface/include/pcl/surface/on_nurbs", 403 | ] 404 | 405 | SURFACE_VTK_SRCS = ["surface/src/vtk_smoothing/**"] 406 | 407 | SURFACE_VTK_HDRS = ["surface/include/pcl/surface/vtk_smoothing/**"] 408 | 409 | pcl_library( 410 | name = "surface", 411 | exclude_hdrs = 412 | SURFACE_ON_NURBS_HDRS + 413 | SURFACE_VTK_HDRS, 414 | exclude_srcs = 415 | SURFACE_ON_NURBS_SRCS + 416 | SURFACE_VTK_SRCS, 417 | deps = [ 418 | ":common", 419 | ":kdtree", 420 | ":octree", 421 | ":search", 422 | "@//:pcl_config", 423 | "@boost//:current_function", 424 | "@boost//:dynamic_bitset", 425 | "@eigen", 426 | "@qhull//:libqhull_r", 427 | ], 428 | ) 429 | 430 | pcl_library( 431 | name = "search", 432 | deps = [ 433 | ":common", 434 | ":kdtree", 435 | ":octree", 436 | "@eigen", 437 | "@flann", 438 | ], 439 | ) 440 | 441 | pcl_library( 442 | name = "test", 443 | deps = [ 444 | ":common", 445 | "@com_google_googletest//:gtest", 446 | ], 447 | ) 448 | 449 | pcl_library( 450 | name = "tracking", 451 | deps = [ 452 | ":common", 453 | ":filters", 454 | ":octree", 455 | ":search", 456 | ], 457 | ) 458 | 459 | # NOTE: This depends on VTK. 460 | # TODO(kgreenek): Figure out how to handle VTK and enable. 461 | #pcl_library( 462 | # name = "visualization", 463 | # deps = [ 464 | # ":common", 465 | # ":filters", 466 | # ":features", 467 | # ":geometry", 468 | # ":io", 469 | # ":kdtree", 470 | # ":registration", 471 | # ":search", 472 | # "@//:pcl_config", 473 | # "@boost//:algorithm", 474 | # "@boost//:foreach", 475 | # "@boost//:filesystem", 476 | # "@boost//:signals2", 477 | # "@boost//:smart_ptr", 478 | # "@boost//:version", 479 | # "@boost//:uuid", 480 | # "@eigen", 481 | # ], 482 | #) 483 | 484 | #################################################################################################### 485 | # Examples 486 | #################################################################################################### 487 | cc_binary( 488 | name = "common_example_check_if_point_is_valid", 489 | srcs = ["examples/common/example_check_if_point_is_valid.cpp"], 490 | deps = [":common"], 491 | ) 492 | 493 | cc_binary( 494 | name = "common_example_copy_point_cloud", 495 | srcs = ["examples/common/example_copy_point_cloud.cpp"], 496 | deps = [":common"], 497 | ) 498 | 499 | cc_binary( 500 | name = "common_example_get_max_min_coordinates", 501 | srcs = ["examples/common/example_get_max_min_coordinates.cpp"], 502 | deps = [":io"], 503 | ) 504 | 505 | cc_binary( 506 | name = "common_example_organized_point_cloud", 507 | srcs = ["examples/common/example_organized_point_cloud.cpp"], 508 | deps = [":common"], 509 | ) 510 | 511 | cc_binary( 512 | name = "common_example_scope_time", 513 | srcs = ["examples/common/example_scope_time.cpp"], 514 | deps = [":common"], 515 | ) 516 | 517 | cc_binary( 518 | name = "features_example_difference_of_normals", 519 | srcs = ["examples/features/example_difference_of_normals.cpp"], 520 | deps = [ 521 | ":common", 522 | ":features", 523 | ":filters", 524 | ":io", 525 | ":segmentation", 526 | ], 527 | ) 528 | 529 | cc_binary( 530 | name = "features_example_fast_point_feature_histograms", 531 | srcs = ["examples/features/example_fast_point_feature_histograms.cpp"], 532 | deps = [ 533 | ":common", 534 | ":features", 535 | ":io", 536 | ":kdtree", 537 | ":search", 538 | ], 539 | ) 540 | 541 | cc_binary( 542 | name = "features_example_normal_estimation", 543 | srcs = ["examples/features/example_normal_estimation.cpp"], 544 | deps = [ 545 | ":common", 546 | ":features", 547 | ":io", 548 | ":kdtree", 549 | ":search", 550 | ], 551 | ) 552 | 553 | cc_binary( 554 | name = "features_example_point_feature_histograms", 555 | srcs = ["examples/features/example_point_feature_histograms.cpp"], 556 | deps = [ 557 | ":common", 558 | ":features", 559 | ":io", 560 | ":kdtree", 561 | ":search", 562 | ], 563 | ) 564 | 565 | cc_binary( 566 | name = "features_example_principal_curvatures_estimation", 567 | srcs = ["examples/features/example_principal_curvatures_estimation.cpp"], 568 | deps = [ 569 | ":common", 570 | ":features", 571 | ":io", 572 | ":kdtree", 573 | ":search", 574 | ], 575 | ) 576 | 577 | cc_binary( 578 | name = "features_example_rift_estimation", 579 | srcs = ["examples/features/example_rift_estimation.cpp"], 580 | deps = [ 581 | ":common", 582 | ":features", 583 | ":io", 584 | ":kdtree", 585 | ":search", 586 | ], 587 | ) 588 | 589 | cc_binary( 590 | name = "features_example_shape_contexts", 591 | srcs = ["examples/features/example_shape_contexts.cpp"], 592 | deps = [ 593 | ":common", 594 | ":features", 595 | ":io", 596 | ":kdtree", 597 | ":search", 598 | ], 599 | ) 600 | 601 | cc_binary( 602 | name = "features_example_spin_images", 603 | srcs = ["examples/features/example_spin_images.cpp"], 604 | deps = [ 605 | ":common", 606 | ":features", 607 | ":io", 608 | ":kdtree", 609 | ":search", 610 | ], 611 | ) 612 | 613 | cc_binary( 614 | name = "filters_example_extract_indices", 615 | srcs = ["examples/filters/example_extract_indices.cpp"], 616 | deps = [ 617 | ":common", 618 | ":filters", 619 | ], 620 | ) 621 | 622 | cc_binary( 623 | name = "filters_example_remove_nan_from_point_cloud", 624 | srcs = ["examples/filters/example_remove_nan_from_point_cloud.cpp"], 625 | deps = [ 626 | ":common", 627 | ":filters", 628 | ], 629 | ) 630 | 631 | cc_binary( 632 | name = "geometry_example_half_edge_mesh", 633 | srcs = ["examples/geometry/example_half_edge_mesh.cpp"], 634 | deps = [ 635 | ":common", 636 | ":geometry", 637 | ], 638 | ) 639 | 640 | cc_binary( 641 | name = "keypoints_example_get_keypoints_indices", 642 | srcs = ["examples/keypoints/example_get_keypoints_indices.cpp"], 643 | deps = [ 644 | ":common", 645 | ":io", 646 | ":keypoints", 647 | ], 648 | ) 649 | 650 | cc_binary( 651 | name = "keypoints_example_sift_keypoint_estimation", 652 | srcs = ["examples/keypoints/example_sift_keypoint_estimation.cpp"], 653 | deps = [ 654 | ":common", 655 | ":io", 656 | ":keypoints", 657 | ], 658 | ) 659 | 660 | cc_binary( 661 | name = "keypoints_example_sift_normal_keypoint_estimation", 662 | srcs = ["examples/keypoints/example_sift_normal_keypoint_estimation.cpp"], 663 | deps = [ 664 | ":common", 665 | ":io", 666 | ":keypoints", 667 | ], 668 | ) 669 | 670 | cc_binary( 671 | name = "keypoints_example_sift_z_keypoint_estimation", 672 | srcs = ["examples/keypoints/example_sift_z_keypoint_estimation.cpp"], 673 | deps = [ 674 | ":common", 675 | ":io", 676 | ":keypoints", 677 | ], 678 | ) 679 | 680 | # TODO(kgreenek): Finish this once the visualization lib is done. 681 | #cc_binary( 682 | # name = "outofcore_example_outofcore", 683 | # srcs = ["examples/outofcore/example_outofcore.cpp"], 684 | # deps = [ 685 | # ":common", 686 | # ":io", 687 | # ":outofcore", 688 | # ], 689 | #) 690 | 691 | # TODO(kgreenek): Finish this once the visualization lib is done. 692 | #cc_binary( 693 | # name = "outofcore_example_outofcore_with_lod", 694 | # srcs = ["examples/outofcore/example_outofcore_with_lod.cpp"], 695 | # deps = [ 696 | # ":common", 697 | # ":io", 698 | # ":outofcore", 699 | # ], 700 | #) 701 | 702 | # TODO(kgreenek): Finish this once the visualization lib is done. 703 | #cc_binary( 704 | # name = "segmentation_example_cpc_segmentation", 705 | # srcs = ["examples/segmentation/example_cpc_segmentation.cpp"], 706 | # deps = [ 707 | # ":common", 708 | # ":io", 709 | # ":segmentation", 710 | # ":visualization", 711 | # "@boost//:format", 712 | # ], 713 | #) 714 | 715 | cc_binary( 716 | name = "segmentation_example_extract_clusters_normals", 717 | srcs = ["examples/segmentation/example_extract_clusters_normals.cpp"], 718 | deps = [ 719 | ":common", 720 | ":features", 721 | ":io", 722 | ":segmentation", 723 | ], 724 | ) 725 | 726 | # TODO(kgreenek): Finish this once the visualization lib is done. 727 | #cc_binary( 728 | # name = "segmentation_example_lccp_segmentation", 729 | # srcs = ["examples/segmentation/example_lccp_segmentation.cpp"], 730 | # deps = [ 731 | # ":common", 732 | # ":io", 733 | # ":segmentation", 734 | # ":visualization", 735 | # "@boost//:format", 736 | # ], 737 | #) 738 | 739 | cc_binary( 740 | name = "segmentation_example_region_growing", 741 | srcs = ["examples/segmentation/example_region_growing.cpp"], 742 | deps = [ 743 | ":common", 744 | ":features", 745 | ":filters", 746 | ":io", 747 | ":segmentation", 748 | ], 749 | ) 750 | 751 | # TODO(kgreenek): Finish this once the visualization lib is done. 752 | #cc_binary( 753 | # name = "segmentation_example_supervoxels", 754 | # srcs = ["examples/segmentation/example_supervoxels.cpp"], 755 | # deps = [ 756 | # ":common", 757 | # ":io", 758 | # ":segmentation", 759 | # ":visualization", 760 | # ], 761 | #) 762 | 763 | # TODO(kgreenek): Finish this once the visualization lib is done. 764 | #cc_binary( 765 | # name = "stereo_example_stereo_baseline", 766 | # srcs = ["examples/stereo/example_stereo_baseline.cpp"], 767 | # deps = [ 768 | # ":common", 769 | # ":io", 770 | # ":stereo", 771 | # ":visualization", 772 | # ], 773 | #) 774 | 775 | # TODO(kgreenek): Finish this once the visualization lib is done. 776 | #cc_binary( 777 | # name = "surface_example_nurbs_fitting_closed_curve", 778 | # srcs = ["examples/surface/example_nurbs_fitting_closed_curve.cpp"], 779 | # deps = [ 780 | # ":common", 781 | # ":io", 782 | # ":surface", 783 | # ":visualization", 784 | # ], 785 | #) 786 | 787 | # TODO(kgreenek): Finish this once the visualization lib is done. 788 | #cc_binary( 789 | # name = "surface_example_nurbs_fitting_closed_curve3d", 790 | # srcs = ["examples/surface/example_nurbs_fitting_closed_curve3d.cpp"], 791 | # deps = [ 792 | # ":common", 793 | # ":io", 794 | # ":surface", 795 | # ":visualization", 796 | # ], 797 | #) 798 | 799 | # TODO(kgreenek): Finish this once the visualization lib is done. 800 | #cc_binary( 801 | # name = "surface_example_nurbs_fitting_curve2d", 802 | # srcs = ["examples/surface/example_nurbs_fitting_curve2d.cpp"], 803 | # deps = [ 804 | # ":common", 805 | # ":io", 806 | # ":surface", 807 | # ":visualization", 808 | # ], 809 | #) 810 | 811 | # TODO(kgreenek): Finish this once the visualization lib is done. 812 | #cc_binary( 813 | # name = "surface_test_nurbs_fitting_surface", 814 | # srcs = ["examples/surface/test_nurbs_fitting_surface.cpp"], 815 | # deps = [ 816 | # ":common", 817 | # ":io", 818 | # ":surface", 819 | # ":visualization", 820 | # ], 821 | #) 822 | 823 | # TODO(kgreenek): Finish this once the visualization lib is done. 824 | #cc_binary( 825 | # name = "surface_example_nurbs_viewer_surface", 826 | # srcs = ["examples/surface/example_nurbs_viewer_surface.cpp"], 827 | # deps = [ 828 | # ":common", 829 | # ":surface", 830 | # ":visualization", 831 | # ], 832 | #) 833 | 834 | # TODO(kgreenek): Finish this once the visualization lib is done. 835 | #cc_binary( 836 | # name = "surface_test_nurbs_fitting_surface", 837 | # srcs = ["examples/surface/test_nurbs_fitting_surface.cpp"], 838 | # deps = [ 839 | # ":common", 840 | # ":surface", 841 | # ":visualization", 842 | # ], 843 | #) 844 | 845 | #################################################################################################### 846 | # TESTS - All the fules below are generated using the gen_test_targests.py script. 847 | #################################################################################################### 848 | 849 | #################################################################################################### 850 | # 2d tests 851 | #################################################################################################### 852 | cc_test( 853 | name = "2d_test_2d_keypoint_instantiation_with_precompile", 854 | size = "small", 855 | srcs = ["test/2d/keypoint_instantiation.cpp"], 856 | deps = [ 857 | ":2d", 858 | ":common", 859 | ":test", 860 | ], 861 | ) 862 | 863 | cc_test( 864 | name = "2d_test_2d_keypoint_instantiation_without_precompile", 865 | size = "small", 866 | srcs = ["test/2d/keypoint_instantiation.cpp"], 867 | deps = [ 868 | ":2d", 869 | ":common", 870 | ":test", 871 | ], 872 | ) 873 | 874 | #################################################################################################### 875 | # common tests 876 | #################################################################################################### 877 | cc_test( 878 | name = "common_test_wrappers", 879 | size = "small", 880 | srcs = ["test/common/test_wrappers.cpp"], 881 | deps = [ 882 | ":common", 883 | ":test", 884 | ], 885 | ) 886 | 887 | cc_test( 888 | name = "common_test_macros", 889 | size = "small", 890 | srcs = ["test/common/test_macros.cpp"], 891 | deps = [ 892 | ":common", 893 | ":test", 894 | ], 895 | ) 896 | 897 | cc_test( 898 | name = "common_test_vector_average", 899 | size = "small", 900 | srcs = ["test/common/test_vector_average.cpp"], 901 | deps = [ 902 | ":common", 903 | ":test", 904 | ], 905 | ) 906 | 907 | cc_test( 908 | name = "common_test_common", 909 | size = "small", 910 | srcs = ["test/common/test_common.cpp"], 911 | deps = [ 912 | ":common", 913 | ":test", 914 | ], 915 | ) 916 | 917 | cc_test( 918 | name = "common_test_pointcloud", 919 | size = "small", 920 | srcs = ["test/common/test_pointcloud.cpp"], 921 | deps = [ 922 | ":common", 923 | ":test", 924 | ], 925 | ) 926 | 927 | cc_test( 928 | name = "common_test_parse", 929 | size = "small", 930 | srcs = ["test/common/test_parse.cpp"], 931 | deps = [ 932 | ":common", 933 | ":test", 934 | ], 935 | ) 936 | 937 | cc_test( 938 | name = "common_test_geometry", 939 | size = "small", 940 | srcs = ["test/common/test_geometry.cpp"], 941 | deps = [ 942 | ":common", 943 | ":test", 944 | ], 945 | ) 946 | 947 | cc_test( 948 | name = "common_test_copy_point", 949 | size = "small", 950 | srcs = ["test/common/test_copy_point.cpp"], 951 | deps = [ 952 | ":common", 953 | ":test", 954 | ], 955 | ) 956 | 957 | cc_test( 958 | name = "common_test_transforms", 959 | size = "small", 960 | srcs = ["test/common/test_transforms.cpp"], 961 | deps = [ 962 | ":common", 963 | ":test", 964 | ], 965 | ) 966 | 967 | cc_test( 968 | name = "common_test_plane_intersection", 969 | size = "small", 970 | srcs = ["test/common/test_plane_intersection.cpp"], 971 | deps = [ 972 | ":common", 973 | ":test", 974 | ], 975 | ) 976 | 977 | cc_test( 978 | name = "common_test_pca", 979 | size = "small", 980 | srcs = ["test/common/test_pca.cpp"], 981 | deps = [ 982 | ":common", 983 | ":test", 984 | ], 985 | ) 986 | 987 | cc_test( 988 | name = "common_test_spring", 989 | size = "small", 990 | srcs = ["test/common/test_spring.cpp"], 991 | deps = [ 992 | ":common", 993 | ":test", 994 | ], 995 | ) 996 | 997 | cc_test( 998 | name = "common_test_gaussian", 999 | size = "small", 1000 | srcs = ["test/common/test_gaussian.cpp"], 1001 | deps = [ 1002 | ":common", 1003 | ":test", 1004 | ], 1005 | ) 1006 | 1007 | cc_test( 1008 | name = "common_test_operators", 1009 | size = "small", 1010 | srcs = ["test/common/test_operators.cpp"], 1011 | deps = [ 1012 | ":common", 1013 | ":test", 1014 | ], 1015 | ) 1016 | 1017 | cc_test( 1018 | name = "common_test_eigen", 1019 | size = "large", 1020 | srcs = ["test/common/test_eigen.cpp"], 1021 | deps = [ 1022 | ":common", 1023 | ":test", 1024 | ], 1025 | ) 1026 | 1027 | cc_test( 1028 | name = "common_test_intensity", 1029 | size = "small", 1030 | srcs = ["test/common/test_intensity.cpp"], 1031 | deps = [ 1032 | ":common", 1033 | ":test", 1034 | ], 1035 | ) 1036 | 1037 | cc_test( 1038 | name = "common_test_generator", 1039 | size = "small", 1040 | srcs = ["test/common/test_generator.cpp"], 1041 | deps = [ 1042 | ":common", 1043 | ":test", 1044 | ], 1045 | ) 1046 | 1047 | cc_test( 1048 | name = "common_test_common_io", 1049 | size = "small", 1050 | srcs = ["test/common/test_io.cpp"], 1051 | deps = [ 1052 | ":common", 1053 | ":test", 1054 | ], 1055 | ) 1056 | 1057 | cc_test( 1058 | name = "common_test_copy_make_borders", 1059 | size = "small", 1060 | srcs = ["test/common/test_copy_make_borders.cpp"], 1061 | deps = [ 1062 | ":common", 1063 | ":test", 1064 | ], 1065 | ) 1066 | 1067 | cc_test( 1068 | name = "common_test_bearing_angle_image", 1069 | size = "small", 1070 | srcs = ["test/common/test_bearing_angle_image.cpp"], 1071 | deps = [ 1072 | ":common", 1073 | ":test", 1074 | ], 1075 | ) 1076 | 1077 | cc_test( 1078 | name = "common_test_polygon_mesh_concatenate", 1079 | size = "small", 1080 | srcs = ["test/common/test_polygon_mesh.cpp"], 1081 | deps = [ 1082 | ":common", 1083 | ":test", 1084 | ], 1085 | ) 1086 | 1087 | cc_test( 1088 | name = "common_test_common_point_type_conversion", 1089 | size = "small", 1090 | srcs = ["test/common/test_point_type_conversion.cpp"], 1091 | deps = [ 1092 | ":common", 1093 | ":test", 1094 | ], 1095 | ) 1096 | 1097 | cc_test( 1098 | name = "common_test_common_point_type_static_member_functions", 1099 | size = "small", 1100 | srcs = ["test/common/test_point_type_static_member_functions.cpp"], 1101 | deps = [ 1102 | ":common", 1103 | ":test", 1104 | ], 1105 | ) 1106 | 1107 | cc_test( 1108 | name = "common_test_colors", 1109 | size = "small", 1110 | srcs = ["test/common/test_colors.cpp"], 1111 | deps = [ 1112 | ":common", 1113 | ":test", 1114 | ], 1115 | ) 1116 | 1117 | cc_test( 1118 | name = "common_test_type_traits", 1119 | size = "small", 1120 | srcs = ["test/common/test_type_traits.cpp"], 1121 | deps = [ 1122 | ":common", 1123 | ":test", 1124 | ], 1125 | ) 1126 | 1127 | cc_test( 1128 | name = "common_test_centroid", 1129 | size = "small", 1130 | srcs = ["test/common/test_centroid.cpp"], 1131 | args = ["../pcl/test/bun0.pcd"], 1132 | data = ["test/bun0.pcd"], 1133 | deps = [ 1134 | ":io", 1135 | ":test", 1136 | ], 1137 | ) 1138 | 1139 | #################################################################################################### 1140 | # features tests 1141 | #################################################################################################### 1142 | cc_test( 1143 | name = "features_test_features_ptr", 1144 | size = "small", 1145 | srcs = ["test/features/test_ptr.cpp"], 1146 | deps = [ 1147 | ":features", 1148 | ":test", 1149 | ], 1150 | ) 1151 | 1152 | cc_test( 1153 | name = "features_test_gradient_estimation", 1154 | size = "small", 1155 | srcs = ["test/features/test_gradient_estimation.cpp"], 1156 | deps = [ 1157 | ":features", 1158 | ":test", 1159 | ], 1160 | ) 1161 | 1162 | cc_test( 1163 | name = "features_test_rift_estimation", 1164 | size = "small", 1165 | srcs = ["test/features/test_rift_estimation.cpp"], 1166 | deps = [ 1167 | ":features", 1168 | ":test", 1169 | ], 1170 | ) 1171 | 1172 | cc_test( 1173 | name = "features_test_base_feature", 1174 | size = "small", 1175 | srcs = ["test/features/test_base_feature.cpp"], 1176 | args = ["../pcl/test/bun0.pcd"], 1177 | data = ["test/bun0.pcd"], 1178 | deps = [ 1179 | ":features", 1180 | ":io", 1181 | ":test", 1182 | ], 1183 | ) 1184 | 1185 | cc_test( 1186 | name = "features_test_cppf_estimation", 1187 | size = "small", 1188 | srcs = ["test/features/test_cppf_estimation.cpp"], 1189 | args = ["../pcl/test/colored_cloud.pcd"], 1190 | data = ["test/colored_cloud.pcd"], 1191 | deps = [ 1192 | ":features", 1193 | ":io", 1194 | ":test", 1195 | ], 1196 | ) 1197 | 1198 | cc_test( 1199 | name = "features_test_normal_estimation", 1200 | size = "small", 1201 | srcs = ["test/features/test_normal_estimation.cpp"], 1202 | args = ["../pcl/test/bun0.pcd"], 1203 | data = ["test/bun0.pcd"], 1204 | deps = [ 1205 | ":features", 1206 | ":io", 1207 | ":test", 1208 | ], 1209 | ) 1210 | 1211 | cc_test( 1212 | name = "features_test_pfh_estimation", 1213 | size = "large", 1214 | srcs = ["test/features/test_pfh_estimation.cpp"], 1215 | args = ["../pcl/test/bun0.pcd"], 1216 | data = ["test/bun0.pcd"], 1217 | deps = [ 1218 | ":features", 1219 | ":io", 1220 | ":test", 1221 | ], 1222 | ) 1223 | 1224 | cc_test( 1225 | name = "features_test_cvfh_estimation", 1226 | size = "small", 1227 | srcs = ["test/features/test_cvfh_estimation.cpp"], 1228 | args = [ 1229 | "../pcl/test/bun0.pcd", 1230 | "../pcl/test/milk.pcd", 1231 | ], 1232 | data = [ 1233 | "test/bun0.pcd", 1234 | "test/milk.pcd", 1235 | ], 1236 | deps = [ 1237 | ":features", 1238 | ":filters", 1239 | ":io", 1240 | ":test", 1241 | ], 1242 | ) 1243 | 1244 | cc_test( 1245 | name = "features_test_ppf_estimation", 1246 | size = "small", 1247 | srcs = ["test/features/test_ppf_estimation.cpp"], 1248 | args = ["../pcl/test/bun0.pcd"], 1249 | data = ["test/bun0.pcd"], 1250 | deps = [ 1251 | ":features", 1252 | ":io", 1253 | ":test", 1254 | ], 1255 | ) 1256 | 1257 | cc_test( 1258 | name = "features_test_shot_estimation", 1259 | size = "small", 1260 | srcs = ["test/features/test_shot_estimation.cpp"], 1261 | args = ["../pcl/test/bun0.pcd"], 1262 | data = ["test/bun0.pcd"], 1263 | deps = [ 1264 | ":features", 1265 | ":io", 1266 | ":test", 1267 | ], 1268 | ) 1269 | 1270 | cc_test( 1271 | name = "features_test_boundary_estimation", 1272 | size = "small", 1273 | srcs = ["test/features/test_boundary_estimation.cpp"], 1274 | args = ["../pcl/test/bun0.pcd"], 1275 | data = ["test/bun0.pcd"], 1276 | deps = [ 1277 | ":features", 1278 | ":io", 1279 | ":test", 1280 | ], 1281 | ) 1282 | 1283 | cc_test( 1284 | name = "features_test_curvatures_estimation", 1285 | size = "small", 1286 | srcs = ["test/features/test_curvatures_estimation.cpp"], 1287 | args = ["../pcl/test/bun0.pcd"], 1288 | data = ["test/bun0.pcd"], 1289 | deps = [ 1290 | ":features", 1291 | ":io", 1292 | ":test", 1293 | ], 1294 | ) 1295 | 1296 | cc_test( 1297 | name = "features_test_spin_estimation", 1298 | size = "small", 1299 | srcs = ["test/features/test_spin_estimation.cpp"], 1300 | args = ["../pcl/test/bun0.pcd"], 1301 | data = ["test/bun0.pcd"], 1302 | deps = [ 1303 | ":features", 1304 | ":io", 1305 | ":test", 1306 | ], 1307 | ) 1308 | 1309 | cc_test( 1310 | name = "features_test_rsd_estimation", 1311 | size = "small", 1312 | srcs = ["test/features/test_rsd_estimation.cpp"], 1313 | args = ["../pcl/test/bun0.pcd"], 1314 | data = ["test/bun0.pcd"], 1315 | deps = [ 1316 | ":features", 1317 | ":io", 1318 | ":kdtree", 1319 | ":test", 1320 | ], 1321 | ) 1322 | 1323 | cc_test( 1324 | name = "features_test_grsd_estimation", 1325 | size = "small", 1326 | srcs = ["test/features/test_grsd_estimation.cpp"], 1327 | args = ["../pcl/test/bun0.pcd"], 1328 | data = ["test/bun0.pcd"], 1329 | deps = [ 1330 | ":features", 1331 | ":io", 1332 | ":kdtree", 1333 | ":test", 1334 | ], 1335 | ) 1336 | 1337 | cc_test( 1338 | name = "features_test_invariants_estimation", 1339 | size = "small", 1340 | srcs = ["test/features/test_invariants_estimation.cpp"], 1341 | args = ["../pcl/test/bun0.pcd"], 1342 | data = ["test/bun0.pcd"], 1343 | deps = [ 1344 | ":features", 1345 | ":io", 1346 | ":test", 1347 | ], 1348 | ) 1349 | 1350 | cc_test( 1351 | name = "features_test_board_estimation", 1352 | size = "small", 1353 | srcs = ["test/features/test_board_estimation.cpp"], 1354 | args = ["../pcl/test/bun0.pcd"], 1355 | data = ["test/bun0.pcd"], 1356 | deps = [ 1357 | ":features", 1358 | ":io", 1359 | ":test", 1360 | ], 1361 | ) 1362 | 1363 | cc_test( 1364 | name = "features_test_flare_estimation", 1365 | size = "small", 1366 | srcs = ["test/features/test_flare_estimation.cpp"], 1367 | args = ["../pcl/test/bun0.pcd"], 1368 | data = ["test/bun0.pcd"], 1369 | deps = [ 1370 | ":features", 1371 | ":io", 1372 | ":test", 1373 | ], 1374 | ) 1375 | 1376 | cc_test( 1377 | name = "features_test_shot_lrf_estimation", 1378 | size = "small", 1379 | srcs = ["test/features/test_shot_lrf_estimation.cpp"], 1380 | args = ["../pcl/test/bun0.pcd"], 1381 | data = ["test/bun0.pcd"], 1382 | deps = [ 1383 | ":features", 1384 | ":io", 1385 | ":test", 1386 | ], 1387 | ) 1388 | 1389 | cc_test( 1390 | name = "features_test_narf", 1391 | size = "small", 1392 | srcs = ["test/features/test_narf.cpp"], 1393 | deps = [ 1394 | ":features", 1395 | ":test", 1396 | "@flann", 1397 | ], 1398 | ) 1399 | 1400 | cc_test( 1401 | name = "features_test_ii_normals", 1402 | size = "medium", 1403 | srcs = ["test/features/test_ii_normals.cpp"], 1404 | args = ["../pcl/test/table_scene_mug_stereo_textured.pcd"], 1405 | data = ["test/table_scene_mug_stereo_textured.pcd"], 1406 | deps = [ 1407 | ":features", 1408 | ":io", 1409 | ":test", 1410 | ], 1411 | ) 1412 | 1413 | cc_test( 1414 | name = "features_test_moment_of_inertia_estimation", 1415 | size = "small", 1416 | srcs = ["test/features/test_moment_of_inertia_estimation.cpp"], 1417 | args = ["../pcl/test/lamppost.pcd"], 1418 | data = ["test/lamppost.pcd"], 1419 | deps = [ 1420 | ":features", 1421 | ":io", 1422 | ":test", 1423 | ], 1424 | ) 1425 | 1426 | cc_test( 1427 | name = "features_test_rops_estimation", 1428 | size = "large", 1429 | srcs = ["test/features/test_rops_estimation.cpp"], 1430 | args = [ 1431 | "../pcl/test/rops_cloud.pcd", 1432 | "../pcl/test/rops_indices.txt", 1433 | "../pcl/test/rops_triangles.txt", 1434 | ], 1435 | data = [ 1436 | "test/rops_cloud.pcd", 1437 | "test/rops_indices.txt", 1438 | "test/rops_triangles.txt", 1439 | ], 1440 | deps = [ 1441 | ":features", 1442 | ":io", 1443 | ":test", 1444 | ], 1445 | ) 1446 | 1447 | cc_test( 1448 | name = "features_test_gasd_estimation", 1449 | size = "small", 1450 | srcs = ["test/features/test_gasd_estimation.cpp"], 1451 | args = ["../pcl/test/bun0.pcd"], 1452 | data = ["test/bun0.pcd"], 1453 | deps = [ 1454 | ":features", 1455 | ":io", 1456 | ":test", 1457 | ], 1458 | ) 1459 | 1460 | cc_test( 1461 | name = "features_test_organized_edge_detection", 1462 | size = "small", 1463 | srcs = ["test/features/test_organized_edge_detection.cpp"], 1464 | deps = [ 1465 | ":features", 1466 | ":io", 1467 | ":test", 1468 | ], 1469 | ) 1470 | 1471 | cc_test( 1472 | name = "features_test_brisk", 1473 | size = "small", 1474 | srcs = ["test/features/test_brisk.cpp"], 1475 | args = [ 1476 | "../pcl/test/brisk_descriptors_gt.pcd", 1477 | "../pcl/test/brisk_image_gt.pcd", 1478 | "../pcl/test/brisk_keypoints_gt.pcd", 1479 | ], 1480 | data = [ 1481 | "test/brisk_descriptors_gt.pcd", 1482 | "test/brisk_image_gt.pcd", 1483 | "test/brisk_keypoints_gt.pcd", 1484 | ], 1485 | deps = [ 1486 | ":common", 1487 | ":features", 1488 | ":filters", 1489 | ":io", 1490 | ":kdtree", 1491 | ":keypoints", 1492 | ":search", 1493 | ":test", 1494 | ], 1495 | ) 1496 | 1497 | #################################################################################################### 1498 | # filters tests 1499 | #################################################################################################### 1500 | cc_test( 1501 | name = "filters_test_filters_grid_minimum", 1502 | size = "small", 1503 | srcs = ["test/filters/test_grid_minimum.cpp"], 1504 | deps = [ 1505 | ":common", 1506 | ":filters", 1507 | ":test", 1508 | ], 1509 | ) 1510 | 1511 | cc_test( 1512 | name = "filters_test_morphological", 1513 | size = "small", 1514 | srcs = ["test/filters/test_morphological.cpp"], 1515 | deps = [ 1516 | ":common", 1517 | ":filters", 1518 | ":test", 1519 | ], 1520 | ) 1521 | 1522 | cc_test( 1523 | name = "filters_test_filters_functor", 1524 | size = "small", 1525 | srcs = ["test/filters/test_functor_filter.cpp"], 1526 | deps = [ 1527 | ":common", 1528 | ":filters", 1529 | ":test", 1530 | ], 1531 | ) 1532 | 1533 | cc_test( 1534 | name = "filters_test_filters_local_maximum", 1535 | size = "small", 1536 | srcs = ["test/filters/test_local_maximum.cpp"], 1537 | deps = [ 1538 | ":common", 1539 | ":filters", 1540 | ":octree", 1541 | ":search", 1542 | ":test", 1543 | ], 1544 | ) 1545 | 1546 | cc_test( 1547 | name = "filters_test_uniform_sampling", 1548 | size = "small", 1549 | srcs = ["test/filters/test_uniform_sampling.cpp"], 1550 | deps = [ 1551 | ":common", 1552 | ":filters", 1553 | ":test", 1554 | ], 1555 | ) 1556 | 1557 | cc_test( 1558 | name = "filters_test_farthest_point_sampling", 1559 | size = "small", 1560 | srcs = ["test/filters/test_farthest_point_sampling.cpp"], 1561 | args = ["../pcl/test/bunny.pcd"], 1562 | data = ["test/bunny.pcd"], 1563 | deps = [ 1564 | ":filters", 1565 | ":io", 1566 | ":test", 1567 | ], 1568 | ) 1569 | 1570 | cc_test( 1571 | name = "filters_test_convolution", 1572 | size = "small", 1573 | srcs = ["test/filters/test_convolution.cpp"], 1574 | deps = [ 1575 | ":filters", 1576 | ":test", 1577 | ], 1578 | ) 1579 | 1580 | cc_test( 1581 | name = "filters_test_crop_hull", 1582 | size = "large", 1583 | srcs = ["test/filters/test_crop_hull.cpp"], 1584 | deps = [ 1585 | ":filters", 1586 | ":test", 1587 | ], 1588 | ) 1589 | 1590 | cc_test( 1591 | name = "filters_test_filters_bilateral", 1592 | size = "large", 1593 | srcs = ["test/filters/test_bilateral.cpp"], 1594 | args = ["../pcl/test/milk_cartoon_all_small_clorox.pcd"], 1595 | data = ["test/milk_cartoon_all_small_clorox.pcd"], 1596 | deps = [ 1597 | ":filters", 1598 | ":io", 1599 | ":kdtree", 1600 | ":test", 1601 | ], 1602 | ) 1603 | 1604 | cc_test( 1605 | name = "filters_test_model_outlier_removal", 1606 | size = "small", 1607 | srcs = ["test/filters/test_model_outlier_removal.cpp"], 1608 | args = ["../pcl/test/milk_cartoon_all_small_clorox.pcd"], 1609 | data = ["test/milk_cartoon_all_small_clorox.pcd"], 1610 | deps = [ 1611 | ":features", 1612 | ":filters", 1613 | ":io", 1614 | ":kdtree", 1615 | ":sample_consensus", 1616 | ":test", 1617 | ], 1618 | ) 1619 | 1620 | cc_test( 1621 | name = "filters_test_filters", 1622 | size = "small", 1623 | srcs = ["test/filters/test_filters.cpp"], 1624 | args = [ 1625 | "../pcl/test/bun0.pcd", 1626 | "../pcl/test/milk_cartoon_all_small_clorox.pcd", 1627 | ], 1628 | data = [ 1629 | "test/bun0.pcd", 1630 | "test/milk_cartoon_all_small_clorox.pcd", 1631 | ], 1632 | deps = [ 1633 | ":features", 1634 | ":filters", 1635 | ":io", 1636 | ":kdtree", 1637 | ":sample_consensus", 1638 | ":segmentation", 1639 | ":test", 1640 | ], 1641 | ) 1642 | 1643 | cc_test( 1644 | name = "filters_test_clipper", 1645 | size = "small", 1646 | srcs = ["test/filters/test_clipper.cpp"], 1647 | deps = [ 1648 | ":filters", 1649 | ":test", 1650 | ], 1651 | ) 1652 | 1653 | #################################################################################################### 1654 | # geometry tests 1655 | #################################################################################################### 1656 | cc_test( 1657 | name = "geometry_test_iterator", 1658 | size = "small", 1659 | srcs = [ 1660 | "test/geometry/test_iterator.cpp", 1661 | "test/geometry/test_mesh_common_functions.h", 1662 | ], 1663 | deps = [ 1664 | ":geometry", 1665 | ":test", 1666 | ], 1667 | ) 1668 | 1669 | cc_test( 1670 | name = "geometry_test_mesh_circulators", 1671 | size = "small", 1672 | srcs = [ 1673 | "test/geometry/test_mesh_circulators.cpp", 1674 | "test/geometry/test_mesh_common_functions.h", 1675 | ], 1676 | deps = [ 1677 | ":geometry", 1678 | ":test", 1679 | ], 1680 | ) 1681 | 1682 | cc_test( 1683 | name = "geometry_test_mesh_conversion", 1684 | size = "small", 1685 | srcs = [ 1686 | "test/geometry/test_mesh_common_functions.h", 1687 | "test/geometry/test_mesh_conversion.cpp", 1688 | ], 1689 | deps = [ 1690 | ":geometry", 1691 | ":test", 1692 | ], 1693 | ) 1694 | 1695 | cc_test( 1696 | name = "geometry_test_mesh_data", 1697 | size = "small", 1698 | srcs = [ 1699 | "test/geometry/test_mesh_common_functions.h", 1700 | "test/geometry/test_mesh_data.cpp", 1701 | ], 1702 | deps = [ 1703 | ":geometry", 1704 | ":test", 1705 | ], 1706 | ) 1707 | 1708 | cc_test( 1709 | name = "geometry_test_mesh_get_boundary", 1710 | size = "small", 1711 | srcs = [ 1712 | "test/geometry/test_mesh_common_functions.h", 1713 | "test/geometry/test_mesh_get_boundary.cpp", 1714 | ], 1715 | deps = [ 1716 | ":geometry", 1717 | ":test", 1718 | ], 1719 | ) 1720 | 1721 | cc_test( 1722 | name = "geometry_test_mesh_indices", 1723 | size = "small", 1724 | srcs = [ 1725 | "test/geometry/test_mesh_common_functions.h", 1726 | "test/geometry/test_mesh_indices.cpp", 1727 | ], 1728 | deps = [ 1729 | ":geometry", 1730 | ":test", 1731 | ], 1732 | ) 1733 | 1734 | cc_test( 1735 | name = "geometry_test_mesh", 1736 | size = "small", 1737 | srcs = [ 1738 | "test/geometry/test_mesh.cpp", 1739 | "test/geometry/test_mesh_common_functions.h", 1740 | ], 1741 | deps = [ 1742 | ":geometry", 1743 | ":test", 1744 | ], 1745 | ) 1746 | 1747 | cc_test( 1748 | name = "geometry_test_polygon_mesh", 1749 | size = "small", 1750 | srcs = [ 1751 | "test/geometry/test_mesh_common_functions.h", 1752 | "test/geometry/test_polygon_mesh.cpp", 1753 | ], 1754 | deps = [ 1755 | ":geometry", 1756 | ":test", 1757 | ], 1758 | ) 1759 | 1760 | cc_test( 1761 | name = "geometry_test_quad_mesh", 1762 | size = "small", 1763 | srcs = [ 1764 | "test/geometry/test_mesh_common_functions.h", 1765 | "test/geometry/test_quad_mesh.cpp", 1766 | ], 1767 | deps = [ 1768 | ":geometry", 1769 | ":test", 1770 | ], 1771 | ) 1772 | 1773 | cc_test( 1774 | name = "geometry_test_triangle_mesh", 1775 | size = "small", 1776 | srcs = [ 1777 | "test/geometry/test_mesh_common_functions.h", 1778 | "test/geometry/test_triangle_mesh.cpp", 1779 | ], 1780 | deps = [ 1781 | ":geometry", 1782 | ":test", 1783 | ], 1784 | ) 1785 | 1786 | #################################################################################################### 1787 | # io tests 1788 | #################################################################################################### 1789 | cc_test( 1790 | name = "io_test_timestamp", 1791 | size = "small", 1792 | srcs = ["test/io/test_timestamp.cpp"], 1793 | deps = [ 1794 | ":io", 1795 | ":test", 1796 | ], 1797 | ) 1798 | 1799 | cc_test( 1800 | name = "io_test_io", 1801 | size = "medium", 1802 | srcs = ["test/io/test_io.cpp"], 1803 | deps = [ 1804 | ":io", 1805 | ":test", 1806 | ], 1807 | ) 1808 | 1809 | cc_test( 1810 | name = "io_test_split", 1811 | size = "small", 1812 | srcs = ["test/io/test_split.cpp"], 1813 | deps = [ 1814 | ":io", 1815 | ":test", 1816 | ], 1817 | ) 1818 | 1819 | cc_test( 1820 | name = "io_test_iterators", 1821 | size = "small", 1822 | srcs = ["test/io/test_iterators.cpp"], 1823 | deps = [ 1824 | ":io", 1825 | ":test", 1826 | ], 1827 | ) 1828 | 1829 | cc_test( 1830 | name = "io_test_range_coder", 1831 | size = "small", 1832 | srcs = ["test/io/test_range_coder.cpp"], 1833 | deps = [ 1834 | ":io", 1835 | ":test", 1836 | ], 1837 | ) 1838 | 1839 | cc_test( 1840 | name = "io_test_grabbers", 1841 | size = "small", 1842 | srcs = ["test/io/test_grabbers.cpp"], 1843 | args = ["../pcl/test/grabber_sequences"], 1844 | data = ["test/grabber_sequences"], 1845 | deps = [ 1846 | ":io", 1847 | ":test", 1848 | ], 1849 | ) 1850 | 1851 | cc_test( 1852 | name = "io_test_ply_io", 1853 | size = "small", 1854 | srcs = ["test/io/test_ply_io.cpp"], 1855 | deps = [ 1856 | ":io", 1857 | ":test", 1858 | ], 1859 | ) 1860 | 1861 | cc_test( 1862 | name = "io_test_point_cloud_image_extractors", 1863 | size = "small", 1864 | srcs = ["test/io/test_point_cloud_image_extractors.cpp"], 1865 | deps = [ 1866 | ":io", 1867 | ":test", 1868 | ], 1869 | ) 1870 | 1871 | cc_test( 1872 | name = "io_test_buffers", 1873 | size = "small", 1874 | srcs = ["test/io/test_buffers.cpp"], 1875 | deps = [ 1876 | ":common", 1877 | ":io", 1878 | ":test", 1879 | ], 1880 | ) 1881 | 1882 | cc_test( 1883 | name = "io_test_octree_compression", 1884 | size = "small", 1885 | srcs = ["test/io/test_octree_compression.cpp"], 1886 | args = ["../pcl/test/milk_color.pcd"], 1887 | data = ["test/milk_color.pcd"], 1888 | deps = [ 1889 | ":common", 1890 | ":io", 1891 | ":octree", 1892 | ":test", 1893 | ], 1894 | ) 1895 | 1896 | #################################################################################################### 1897 | # ml tests 1898 | #################################################################################################### 1899 | cc_test( 1900 | name = "ml_test_ml_kmeans", 1901 | size = "small", 1902 | srcs = ["test/ml/test_kmeans.cpp"], 1903 | deps = [ 1904 | ":common", 1905 | ":ml", 1906 | ":test", 1907 | ], 1908 | ) 1909 | 1910 | #################################################################################################### 1911 | # octree tests 1912 | #################################################################################################### 1913 | cc_test( 1914 | name = "octree_test_octree", 1915 | size = "large", 1916 | srcs = ["test/octree/test_octree.cpp"], 1917 | deps = [ 1918 | ":common", 1919 | ":octree", 1920 | ":test", 1921 | ], 1922 | ) 1923 | 1924 | cc_test( 1925 | name = "octree_test_octree_iterator", 1926 | size = "small", 1927 | srcs = ["test/octree/test_octree_iterator.cpp"], 1928 | deps = [ 1929 | ":common", 1930 | ":octree", 1931 | ":test", 1932 | ], 1933 | ) 1934 | 1935 | #################################################################################################### 1936 | # registration tests 1937 | #################################################################################################### 1938 | cc_test( 1939 | name = "registration_test_warps", 1940 | size = "small", 1941 | srcs = ["test/registration/test_warps.cpp"], 1942 | deps = [ 1943 | ":registration", 1944 | ":test", 1945 | ], 1946 | ) 1947 | 1948 | cc_test( 1949 | name = "registration_test_correspondence_estimation", 1950 | size = "small", 1951 | srcs = ["test/registration/test_correspondence_estimation.cpp"], 1952 | deps = [ 1953 | ":features", 1954 | ":io", 1955 | ":registration", 1956 | ":test", 1957 | ], 1958 | ) 1959 | 1960 | cc_test( 1961 | name = "registration_test_registration", 1962 | size = "small", 1963 | srcs = ["test/registration/test_registration.cpp"], 1964 | args = [ 1965 | "../pcl/test/bun0.pcd", 1966 | "../pcl/test/bun4.pcd", 1967 | "../pcl/test/milk_color.pcd", 1968 | ], 1969 | data = [ 1970 | "test/bun0.pcd", 1971 | "test/bun4.pcd", 1972 | "test/milk_color.pcd", 1973 | ], 1974 | deps = [ 1975 | ":features", 1976 | ":io", 1977 | ":kdtree", 1978 | ":registration", 1979 | ":search", 1980 | ":test", 1981 | ], 1982 | ) 1983 | 1984 | cc_test( 1985 | name = "registration_test_ndt", 1986 | size = "small", 1987 | srcs = ["test/registration/test_ndt.cpp"], 1988 | args = [ 1989 | "../pcl/test/bun0.pcd", 1990 | "../pcl/test/bun4.pcd", 1991 | ], 1992 | data = [ 1993 | "test/bun0.pcd", 1994 | "test/bun4.pcd", 1995 | ], 1996 | deps = [ 1997 | ":io", 1998 | ":registration", 1999 | ":test", 2000 | ], 2001 | ) 2002 | 2003 | cc_test( 2004 | name = "registration_test_sac_ia", 2005 | size = "small", 2006 | srcs = ["test/registration/test_sac_ia.cpp"], 2007 | args = [ 2008 | "../pcl/test/bun0.pcd", 2009 | "../pcl/test/bun4.pcd", 2010 | ], 2011 | data = [ 2012 | "test/bun0.pcd", 2013 | "test/bun4.pcd", 2014 | ], 2015 | deps = [ 2016 | ":io", 2017 | ":registration", 2018 | ":test", 2019 | ], 2020 | ) 2021 | 2022 | cc_test( 2023 | name = "registration_test_registration_api", 2024 | size = "small", 2025 | srcs = [ 2026 | "test/registration/test_registration_api.cpp", 2027 | "test/registration/test_registration_api_data.h", 2028 | ], 2029 | args = [ 2030 | "../pcl/test/bun0.pcd", 2031 | "../pcl/test/bun4.pcd", 2032 | ], 2033 | data = [ 2034 | "test/bun0.pcd", 2035 | "test/bun4.pcd", 2036 | ], 2037 | deps = [ 2038 | ":features", 2039 | ":io", 2040 | ":kdtree", 2041 | ":registration", 2042 | ":test", 2043 | ], 2044 | ) 2045 | 2046 | cc_test( 2047 | name = "registration_test_correspondence_rejectors", 2048 | size = "small", 2049 | srcs = ["test/registration/test_correspondence_rejectors.cpp"], 2050 | args = ["../pcl/test/bunny.pcd"], 2051 | data = ["test/bunny.pcd"], 2052 | deps = [ 2053 | ":features", 2054 | ":io", 2055 | ":registration", 2056 | ":test", 2057 | ], 2058 | ) 2059 | 2060 | cc_test( 2061 | name = "registration_test_fpcs_ia", 2062 | size = "small", 2063 | srcs = [ 2064 | "test/registration/test_fpcs_ia.cpp", 2065 | "test/registration/test_fpcs_ia_data.h", 2066 | ], 2067 | args = [ 2068 | "../pcl/test/bun0.pcd", 2069 | "../pcl/test/bun4.pcd", 2070 | ], 2071 | data = [ 2072 | "test/bun0.pcd", 2073 | "test/bun4.pcd", 2074 | ], 2075 | deps = [ 2076 | ":features", 2077 | ":io", 2078 | ":kdtree", 2079 | ":registration", 2080 | ":search", 2081 | ":test", 2082 | ], 2083 | ) 2084 | 2085 | cc_test( 2086 | name = "registration_test_kfpcs_ia", 2087 | size = "medium", 2088 | srcs = [ 2089 | "test/registration/test_kfpcs_ia.cpp", 2090 | "test/registration/test_kfpcs_ia_data.h", 2091 | ], 2092 | args = [ 2093 | "../pcl/test/office1_keypoints.pcd", 2094 | "../pcl/test/office2_keypoints.pcd", 2095 | ], 2096 | data = [ 2097 | "test/office1_keypoints.pcd", 2098 | "test/office2_keypoints.pcd", 2099 | ], 2100 | deps = [ 2101 | ":features", 2102 | ":io", 2103 | ":kdtree", 2104 | ":registration", 2105 | ":search", 2106 | ":test", 2107 | ], 2108 | ) 2109 | 2110 | #################################################################################################### 2111 | # sample_consensus tests 2112 | #################################################################################################### 2113 | cc_test( 2114 | name = "sample_consensus_test_sample_consensus_plane_models", 2115 | size = "small", 2116 | srcs = ["test/sample_consensus/test_sample_consensus_plane_models.cpp"], 2117 | args = ["../pcl/test/sac_plane_test.pcd"], 2118 | data = ["test/sac_plane_test.pcd"], 2119 | deps = [ 2120 | ":io", 2121 | ":sample_consensus", 2122 | ":test", 2123 | ], 2124 | ) 2125 | 2126 | cc_test( 2127 | name = "sample_consensus_test_sample_consensus_quadric_models", 2128 | size = "small", 2129 | srcs = ["test/sample_consensus/test_sample_consensus_quadric_models.cpp"], 2130 | deps = [ 2131 | ":sample_consensus", 2132 | ":test", 2133 | ], 2134 | ) 2135 | 2136 | cc_test( 2137 | name = "sample_consensus_test_sample_consensus_line_models", 2138 | size = "small", 2139 | srcs = ["test/sample_consensus/test_sample_consensus_line_models.cpp"], 2140 | deps = [ 2141 | ":sample_consensus", 2142 | ":test", 2143 | ], 2144 | ) 2145 | 2146 | #################################################################################################### 2147 | # search tests 2148 | #################################################################################################### 2149 | cc_test( 2150 | name = "search_test_kdtree_search", 2151 | size = "large", 2152 | srcs = [ 2153 | "test/search/precise_distances.h", 2154 | "test/search/test_kdtree.cpp", 2155 | ], 2156 | deps = [ 2157 | ":kdtree", 2158 | ":search", 2159 | ":test", 2160 | ], 2161 | ) 2162 | 2163 | cc_test( 2164 | name = "search_test_flann_search", 2165 | size = "large", 2166 | srcs = [ 2167 | "test/search/precise_distances.h", 2168 | "test/search/test_flann_search.cpp", 2169 | ], 2170 | deps = [ 2171 | ":kdtree", 2172 | ":search", 2173 | ":test", 2174 | ], 2175 | ) 2176 | 2177 | cc_test( 2178 | name = "search_test_organized_search", 2179 | size = "small", 2180 | srcs = [ 2181 | "test/search/precise_distances.h", 2182 | "test/search/test_organized.cpp", 2183 | ], 2184 | deps = [ 2185 | ":kdtree", 2186 | ":search", 2187 | ":test", 2188 | ], 2189 | ) 2190 | 2191 | cc_test( 2192 | name = "search_test_octree_search", 2193 | size = "small", 2194 | srcs = [ 2195 | "test/search/precise_distances.h", 2196 | "test/search/test_octree.cpp", 2197 | ], 2198 | deps = [ 2199 | ":common", 2200 | ":octree", 2201 | ":search", 2202 | ":test", 2203 | ], 2204 | ) 2205 | 2206 | cc_test( 2207 | name = "search_test_search", 2208 | size = "large", 2209 | srcs = [ 2210 | "test/search/precise_distances.h", 2211 | "test/search/test_search.cpp", 2212 | ], 2213 | args = ["../pcl/test/table_scene_mug_stereo_textured.pcd"], 2214 | data = ["test/table_scene_mug_stereo_textured.pcd"], 2215 | deps = [ 2216 | ":io", 2217 | ":kdtree", 2218 | ":search", 2219 | ":test", 2220 | ], 2221 | ) 2222 | 2223 | cc_test( 2224 | name = "search_test_organized_index", 2225 | size = "small", 2226 | srcs = [ 2227 | "test/search/precise_distances.h", 2228 | "test/search/test_organized_index.cpp", 2229 | ], 2230 | args = ["../pcl/test/office1.pcd"], 2231 | data = ["test/office1.pcd"], 2232 | deps = [ 2233 | ":common", 2234 | ":io", 2235 | ":search", 2236 | ":test", 2237 | ], 2238 | ) 2239 | 2240 | #################################################################################################### 2241 | # surface tests 2242 | #################################################################################################### 2243 | cc_test( 2244 | name = "surface_test_marching_cubes", 2245 | size = "large", 2246 | srcs = ["test/surface/test_marching_cubes.cpp"], 2247 | args = ["../pcl/test/bun0.pcd"], 2248 | data = ["test/bun0.pcd"], 2249 | deps = [ 2250 | ":features", 2251 | ":io", 2252 | ":kdtree", 2253 | ":search", 2254 | ":surface", 2255 | ":test", 2256 | ], 2257 | ) 2258 | 2259 | cc_test( 2260 | name = "surface_test_moving_least_squares", 2261 | size = "small", 2262 | srcs = ["test/surface/test_moving_least_squares.cpp"], 2263 | args = ["../pcl/test/bun0.pcd"], 2264 | data = ["test/bun0.pcd"], 2265 | deps = [ 2266 | ":features", 2267 | ":io", 2268 | ":kdtree", 2269 | ":search", 2270 | ":surface", 2271 | ":test", 2272 | ], 2273 | ) 2274 | 2275 | cc_test( 2276 | name = "surface_test_gp3", 2277 | size = "small", 2278 | srcs = ["test/surface/test_gp3.cpp"], 2279 | args = ["../pcl/test/bun0.pcd"], 2280 | data = ["test/bun0.pcd"], 2281 | deps = [ 2282 | ":features", 2283 | ":io", 2284 | ":kdtree", 2285 | ":search", 2286 | ":surface", 2287 | ":test", 2288 | ], 2289 | ) 2290 | 2291 | cc_test( 2292 | name = "surface_test_organized_fast_mesh", 2293 | size = "small", 2294 | srcs = ["test/surface/test_organized_fast_mesh.cpp"], 2295 | args = ["../pcl/test/bun0.pcd"], 2296 | data = ["test/bun0.pcd"], 2297 | deps = [ 2298 | ":features", 2299 | ":io", 2300 | ":kdtree", 2301 | ":search", 2302 | ":surface", 2303 | ":test", 2304 | ], 2305 | ) 2306 | 2307 | cc_test( 2308 | name = "surface_test_grid_projection", 2309 | size = "large", 2310 | srcs = ["test/surface/test_grid_projection.cpp"], 2311 | args = ["../pcl/test/bun0.pcd"], 2312 | data = ["test/bun0.pcd"], 2313 | deps = [ 2314 | ":features", 2315 | ":io", 2316 | ":kdtree", 2317 | ":search", 2318 | ":surface", 2319 | ":test", 2320 | ], 2321 | ) 2322 | 2323 | cc_test( 2324 | name = "surface_test_ear_clipping", 2325 | size = "small", 2326 | srcs = ["test/surface/test_ear_clipping.cpp"], 2327 | args = ["../pcl/test/bun0.pcd"], 2328 | data = ["test/bun0.pcd"], 2329 | deps = [ 2330 | ":features", 2331 | ":io", 2332 | ":kdtree", 2333 | ":search", 2334 | ":surface", 2335 | ":test", 2336 | ], 2337 | ) 2338 | 2339 | cc_test( 2340 | name = "surface_test_poisson", 2341 | size = "small", 2342 | srcs = ["test/surface/test_poisson.cpp"], 2343 | args = ["../pcl/test/bun0.pcd"], 2344 | data = ["test/bun0.pcd"], 2345 | deps = [ 2346 | ":features", 2347 | ":io", 2348 | ":kdtree", 2349 | ":surface", 2350 | ":test", 2351 | ], 2352 | ) 2353 | 2354 | cc_test( 2355 | name = "surface_test_convex_hull", 2356 | size = "large", 2357 | srcs = ["test/surface/test_convex_hull.cpp"], 2358 | args = ["../pcl/test/bun0.pcd"], 2359 | data = ["test/bun0.pcd"], 2360 | deps = [ 2361 | ":features", 2362 | ":filters", 2363 | ":io", 2364 | ":kdtree", 2365 | ":search", 2366 | ":surface", 2367 | ":test", 2368 | ], 2369 | ) 2370 | 2371 | cc_test( 2372 | name = "surface_test_concave_hull", 2373 | size = "small", 2374 | srcs = ["test/surface/test_concave_hull.cpp"], 2375 | args = ["../pcl/test/bun0.pcd"], 2376 | data = ["test/bun0.pcd"], 2377 | deps = [ 2378 | ":features", 2379 | ":filters", 2380 | ":io", 2381 | ":kdtree", 2382 | ":sample_consensus", 2383 | ":search", 2384 | ":surface", 2385 | ":test", 2386 | ], 2387 | ) 2388 | -------------------------------------------------------------------------------- /third_party/qhull.BUILD: -------------------------------------------------------------------------------- 1 | # Description: 2 | # Convex hull, Delaunay triangulation, Voronoi diagrams, Halfspace intersection. 3 | 4 | licenses(["notice"]) # BSD/MIT-like license 5 | 6 | cc_library( 7 | name = "libqhull", 8 | srcs = [ 9 | "src/libqhull/global.c", 10 | "src/libqhull/stat.c", 11 | "src/libqhull/geom2.c", 12 | "src/libqhull/poly2.c", 13 | "src/libqhull/merge.c", 14 | "src/libqhull/libqhull.c", 15 | "src/libqhull/geom.c", 16 | "src/libqhull/poly.c", 17 | "src/libqhull/qset.c", 18 | "src/libqhull/mem.c", 19 | "src/libqhull/random.c", 20 | "src/libqhull/usermem.c", 21 | "src/libqhull/userprintf.c", 22 | "src/libqhull/io.c", 23 | "src/libqhull/user.c", 24 | "src/libqhull/rboxlib.c", 25 | "src/libqhull/userprintf_rbox.c", 26 | ], 27 | hdrs = [ 28 | "src/libqhull/libqhull.h", 29 | "src/libqhull/geom.h", 30 | "src/libqhull/io.h", 31 | "src/libqhull/mem.h", 32 | "src/libqhull/merge.h", 33 | "src/libqhull/poly.h", 34 | "src/libqhull/qhull_a.h", 35 | "src/libqhull/qset.h", 36 | "src/libqhull/random.h", 37 | "src/libqhull/stat.h", 38 | "src/libqhull/user.h", 39 | ], 40 | includes = ["src"], 41 | linkopts = ["-lm"], 42 | visibility = ["//visibility:public"], 43 | ) 44 | 45 | cc_library( 46 | name = "libqhull_r", 47 | srcs = [ 48 | "src/libqhull_r/global_r.c", 49 | "src/libqhull_r/stat_r.c", 50 | "src/libqhull_r/geom2_r.c", 51 | "src/libqhull_r/poly2_r.c", 52 | "src/libqhull_r/merge_r.c", 53 | "src/libqhull_r/libqhull_r.c", 54 | "src/libqhull_r/geom_r.c", 55 | "src/libqhull_r/poly_r.c", 56 | "src/libqhull_r/qset_r.c", 57 | "src/libqhull_r/mem_r.c", 58 | "src/libqhull_r/random_r.c", 59 | "src/libqhull_r/usermem_r.c", 60 | "src/libqhull_r/userprintf_r.c", 61 | "src/libqhull_r/io_r.c", 62 | "src/libqhull_r/user_r.c", 63 | "src/libqhull_r/rboxlib_r.c", 64 | "src/libqhull_r/userprintf_rbox_r.c", 65 | ], 66 | hdrs = [ 67 | "src/libqhull_r/libqhull_r.h", 68 | "src/libqhull_r/geom_r.h", 69 | "src/libqhull_r/io_r.h", 70 | "src/libqhull_r/mem_r.h", 71 | "src/libqhull_r/merge_r.h", 72 | "src/libqhull_r/poly_r.h", 73 | "src/libqhull_r/qhull_ra.h", 74 | "src/libqhull_r/qset_r.h", 75 | "src/libqhull_r/random_r.h", 76 | "src/libqhull_r/stat_r.h", 77 | "src/libqhull_r/user_r.h", 78 | ], 79 | includes = ["src"], 80 | linkopts = ["-lm"], 81 | visibility = ["//visibility:public"], 82 | ) 83 | 84 | cc_library( 85 | name = "libqhullcpp", 86 | srcs = [ 87 | "src/libqhullcpp/Coordinates.cpp", 88 | "src/libqhullcpp/PointCoordinates.cpp", 89 | "src/libqhullcpp/Qhull.cpp", 90 | "src/libqhullcpp/QhullFacet.cpp", 91 | "src/libqhullcpp/QhullFacetList.cpp", 92 | "src/libqhullcpp/QhullFacetSet.cpp", 93 | "src/libqhullcpp/QhullHyperplane.cpp", 94 | "src/libqhullcpp/QhullPoint.cpp", 95 | "src/libqhullcpp/QhullPointSet.cpp", 96 | "src/libqhullcpp/QhullPoints.cpp", 97 | "src/libqhullcpp/QhullQh.cpp", 98 | "src/libqhullcpp/QhullRidge.cpp", 99 | "src/libqhullcpp/QhullSet.cpp", 100 | "src/libqhullcpp/QhullStat.cpp", 101 | "src/libqhullcpp/QhullVertex.cpp", 102 | "src/libqhullcpp/QhullVertexSet.cpp", 103 | "src/libqhullcpp/RboxPoints.cpp", 104 | "src/libqhullcpp/RoadError.cpp", 105 | "src/libqhullcpp/RoadLogEvent.cpp", 106 | ], 107 | hdrs = [ 108 | "src/libqhullcpp/Coordinates.h", 109 | "src/libqhullcpp/functionObjects.h", 110 | "src/libqhullcpp/PointCoordinates.h", 111 | "src/libqhullcpp/Qhull.h", 112 | "src/libqhullcpp/QhullError.h", 113 | "src/libqhullcpp/QhullFacet.h", 114 | "src/libqhullcpp/QhullFacetList.h", 115 | "src/libqhullcpp/QhullFacetSet.h", 116 | "src/libqhullcpp/QhullHyperplane.h", 117 | "src/libqhullcpp/QhullIterator.h", 118 | "src/libqhullcpp/QhullLinkedList.h", 119 | "src/libqhullcpp/QhullPoint.h", 120 | "src/libqhullcpp/QhullPoints.h", 121 | "src/libqhullcpp/QhullPointSet.h", 122 | "src/libqhullcpp/QhullQh.h", 123 | "src/libqhullcpp/QhullRidge.h", 124 | "src/libqhullcpp/QhullSet.h", 125 | "src/libqhullcpp/QhullSets.h", 126 | "src/libqhullcpp/QhullStat.h", 127 | "src/libqhullcpp/QhullVertex.h", 128 | "src/libqhullcpp/QhullVertexSet.h", 129 | "src/libqhullcpp/RboxPoints.h", 130 | "src/libqhullcpp/RoadError.h", 131 | "src/libqhullcpp/RoadLogEvent.h", 132 | "src/qhulltest/RoadTest.h", 133 | ], 134 | includes = ["src"], 135 | deps = [":libqhull_r"], 136 | visibility = ["//visibility:public"], 137 | ) 138 | -------------------------------------------------------------------------------- /third_party/zlib.BUILD: -------------------------------------------------------------------------------- 1 | # Description: 2 | # A Massively Spiffy Yet Delicately Unobtrusive Compression Library. 3 | 4 | licenses(["notice"]) # BSD/MIT-like license 5 | 6 | cc_library( 7 | name = "zlib", 8 | srcs = [ 9 | "adler32.c", 10 | "compress.c", 11 | "crc32.c", 12 | "crc32.h", 13 | "deflate.c", 14 | "deflate.h", 15 | "gzclose.c", 16 | "gzguts.h", 17 | "gzlib.c", 18 | "gzread.c", 19 | "gzwrite.c", 20 | "infback.c", 21 | "inffast.c", 22 | "inffast.h", 23 | "inffixed.h", 24 | "inflate.c", 25 | "inflate.h", 26 | "inftrees.c", 27 | "inftrees.h", 28 | "trees.c", 29 | "trees.h", 30 | "uncompr.c", 31 | "zconf.h", 32 | "zutil.c", 33 | "zutil.h", 34 | ], 35 | hdrs = ["zlib.h"], 36 | copts = ["-Wno-implicit-function-declaration"], 37 | includes = ["."], 38 | visibility = ["//visibility:public"], 39 | ) 40 | --------------------------------------------------------------------------------