Austin Schuh | 033df09 | 2019-01-21 19:46:48 -0800 | [diff] [blame] | 1 | # Ceres Solver - A fast non-linear least squares minimizer |
| 2 | # Copyright 2018 Google Inc. All rights reserved. |
| 3 | # http://ceres-solver.org/ |
| 4 | # |
| 5 | # Redistribution and use in source and binary forms, with or without |
| 6 | # modification, are permitted provided that the following conditions are met: |
| 7 | # |
| 8 | # * Redistributions of source code must retain the above copyright notice, |
| 9 | # this list of conditions and the following disclaimer. |
| 10 | # * Redistributions in binary form must reproduce the above copyright notice, |
| 11 | # this list of conditions and the following disclaimer in the documentation |
| 12 | # and/or other materials provided with the distribution. |
| 13 | # * Neither the name of Google Inc. nor the names of its contributors may be |
| 14 | # used to endorse or promote products derived from this software without |
| 15 | # specific prior written permission. |
| 16 | # |
| 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 21 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 25 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 26 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 27 | # POSSIBILITY OF SUCH DAMAGE. |
| 28 | # |
| 29 | # Author: mierle@gmail.com (Keir Mierle) |
| 30 | |
| 31 | EXAMPLE_COPTS = [ |
| 32 | # Needed to silence GFlags complaints. |
| 33 | "-Wno-sign-compare", |
| 34 | "-Wno-unused-parameter", |
| 35 | "-Wno-format-nonliteral", |
| 36 | ] |
| 37 | |
| 38 | EXAMPLE_DEPS = [ |
| 39 | "//:ceres", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 40 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | 033df09 | 2019-01-21 19:46:48 -0800 | [diff] [blame] | 41 | "@com_github_gflags_gflags//:gflags", |
| 42 | ] |
| 43 | |
| 44 | cc_binary( |
| 45 | name = "bundle_adjuster", |
| 46 | srcs = [ |
| 47 | "bal_problem.cc", |
| 48 | "bal_problem.h", |
| 49 | "bundle_adjuster.cc", |
| 50 | "random.h", |
| 51 | "snavely_reprojection_error.h", |
| 52 | ], |
| 53 | copts = EXAMPLE_COPTS, |
| 54 | deps = EXAMPLE_DEPS, |
| 55 | ) |
| 56 | |
| 57 | cc_binary( |
| 58 | name = "denoising", |
| 59 | srcs = [ |
| 60 | "denoising.cc", |
| 61 | "fields_of_experts.cc", |
| 62 | "fields_of_experts.h", |
| 63 | "pgm_image.h", |
| 64 | ], |
| 65 | copts = EXAMPLE_COPTS, |
| 66 | deps = EXAMPLE_DEPS, |
| 67 | ) |
| 68 | |
| 69 | cc_binary( |
| 70 | name = "robot_pose_mle", |
| 71 | srcs = [ |
| 72 | "random.h", |
| 73 | "robot_pose_mle.cc", |
| 74 | ], |
| 75 | copts = EXAMPLE_COPTS, |
| 76 | deps = EXAMPLE_DEPS, |
| 77 | ) |
| 78 | |
| 79 | cc_binary( |
| 80 | name = "pose_graph_2d", |
| 81 | srcs = [ |
| 82 | "slam/common/read_g2o.h", |
| 83 | "slam/pose_graph_2d/angle_local_parameterization.h", |
| 84 | "slam/pose_graph_2d/normalize_angle.h", |
| 85 | "slam/pose_graph_2d/pose_graph_2d.cc", |
| 86 | "slam/pose_graph_2d/pose_graph_2d_error_term.h", |
| 87 | "slam/pose_graph_2d/types.h", |
| 88 | ], |
| 89 | copts = EXAMPLE_COPTS, |
| 90 | includes = ["slam"], |
| 91 | deps = EXAMPLE_DEPS, |
| 92 | ) |
| 93 | |
| 94 | cc_binary( |
| 95 | name = "pose_graph_3d", |
| 96 | srcs = [ |
| 97 | "slam/common/read_g2o.h", |
| 98 | "slam/pose_graph_3d/pose_graph_3d.cc", |
| 99 | "slam/pose_graph_3d/pose_graph_3d_error_term.h", |
| 100 | "slam/pose_graph_3d/types.h", |
| 101 | ], |
| 102 | copts = EXAMPLE_COPTS, |
| 103 | includes = ["slam"], |
| 104 | deps = EXAMPLE_DEPS, |
| 105 | ) |
| 106 | |
| 107 | [cc_binary( |
| 108 | name = example, |
| 109 | srcs = [example + ".cc"], |
| 110 | copts = EXAMPLE_COPTS, |
| 111 | deps = EXAMPLE_DEPS, |
| 112 | ) for example in [ |
| 113 | "circle_fit", |
| 114 | "curve_fitting", |
| 115 | "ellipse_approximation", |
| 116 | "helloworld", |
| 117 | "helloworld_analytic_diff", |
| 118 | "helloworld_numeric_diff", |
| 119 | "libmv_bundle_adjuster", |
| 120 | "libmv_homography", |
| 121 | "more_garbow_hillstrom", |
| 122 | "nist", |
| 123 | "powell", |
| 124 | "robust_curve_fitting", |
| 125 | "rosenbrock", |
| 126 | "sampled_function/sampled_function", |
| 127 | "simple_bundle_adjuster", |
| 128 | ]] |