Keir Mierle | a3b1e19 | 2018-02-21 11:13:57 -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", |
Austin Schuh | 17cf018 | 2020-12-23 23:42:34 -0800 | [diff] [blame] | 34 | # Needed to put fscanf in a function. |
| 35 | "-Wno-format-nonliteral", |
Keir Mierle | a3b1e19 | 2018-02-21 11:13:57 -0800 | [diff] [blame] | 36 | ] |
| 37 | |
| 38 | EXAMPLE_DEPS = [ |
| 39 | "//:ceres", |
Sameer Agarwal | 29c2912 | 2020-10-13 12:07:06 -0700 | [diff] [blame] | 40 | "@com_gitlab_libeigen_eigen//:eigen", |
Keir Mierle | a3b1e19 | 2018-02-21 11:13:57 -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", |
Keir Mierle | a3b1e19 | 2018-02-21 11:13:57 -0800 | [diff] [blame] | 50 | "snavely_reprojection_error.h", |
| 51 | ], |
| 52 | copts = EXAMPLE_COPTS, |
| 53 | deps = EXAMPLE_DEPS, |
| 54 | ) |
| 55 | |
| 56 | cc_binary( |
| 57 | name = "denoising", |
| 58 | srcs = [ |
| 59 | "denoising.cc", |
| 60 | "fields_of_experts.cc", |
| 61 | "fields_of_experts.h", |
| 62 | "pgm_image.h", |
| 63 | ], |
| 64 | copts = EXAMPLE_COPTS, |
| 65 | deps = EXAMPLE_DEPS, |
| 66 | ) |
| 67 | |
| 68 | cc_binary( |
| 69 | name = "robot_pose_mle", |
| 70 | srcs = [ |
Keir Mierle | a3b1e19 | 2018-02-21 11:13:57 -0800 | [diff] [blame] | 71 | "robot_pose_mle.cc", |
| 72 | ], |
| 73 | copts = EXAMPLE_COPTS, |
| 74 | deps = EXAMPLE_DEPS, |
| 75 | ) |
| 76 | |
Keir Mierle | a3b1e19 | 2018-02-21 11:13:57 -0800 | [diff] [blame] | 77 | cc_binary( |
| 78 | name = "pose_graph_2d", |
| 79 | srcs = [ |
| 80 | "slam/common/read_g2o.h", |
| 81 | "slam/pose_graph_2d/angle_local_parameterization.h", |
| 82 | "slam/pose_graph_2d/normalize_angle.h", |
| 83 | "slam/pose_graph_2d/pose_graph_2d.cc", |
| 84 | "slam/pose_graph_2d/pose_graph_2d_error_term.h", |
| 85 | "slam/pose_graph_2d/types.h", |
| 86 | ], |
Austin Schuh | c48a327 | 2020-12-23 22:37:59 -0800 | [diff] [blame] | 87 | copts = EXAMPLE_COPTS, |
| 88 | includes = ["slam"], |
Keir Mierle | a3b1e19 | 2018-02-21 11:13:57 -0800 | [diff] [blame] | 89 | deps = EXAMPLE_DEPS, |
| 90 | ) |
| 91 | |
| 92 | cc_binary( |
| 93 | name = "pose_graph_3d", |
| 94 | srcs = [ |
| 95 | "slam/common/read_g2o.h", |
| 96 | "slam/pose_graph_3d/pose_graph_3d.cc", |
| 97 | "slam/pose_graph_3d/pose_graph_3d_error_term.h", |
| 98 | "slam/pose_graph_3d/types.h", |
| 99 | ], |
Austin Schuh | c48a327 | 2020-12-23 22:37:59 -0800 | [diff] [blame] | 100 | copts = EXAMPLE_COPTS, |
| 101 | includes = ["slam"], |
Keir Mierle | a3b1e19 | 2018-02-21 11:13:57 -0800 | [diff] [blame] | 102 | deps = EXAMPLE_DEPS, |
| 103 | ) |
| 104 | |
| 105 | [cc_binary( |
| 106 | name = example, |
| 107 | srcs = [example + ".cc"], |
| 108 | copts = EXAMPLE_COPTS, |
| 109 | deps = EXAMPLE_DEPS, |
| 110 | ) for example in [ |
| 111 | "circle_fit", |
| 112 | "curve_fitting", |
| 113 | "ellipse_approximation", |
| 114 | "helloworld", |
| 115 | "helloworld_analytic_diff", |
| 116 | "helloworld_numeric_diff", |
| 117 | "libmv_bundle_adjuster", |
| 118 | "libmv_homography", |
| 119 | "more_garbow_hillstrom", |
| 120 | "nist", |
| 121 | "powell", |
| 122 | "robust_curve_fitting", |
| 123 | "rosenbrock", |
| 124 | "sampled_function/sampled_function", |
| 125 | "simple_bundle_adjuster", |
| 126 | ]] |