blob: 8741b94801dfae4ba417e167f6fdac58aa2184e6 [file] [log] [blame]
Austin Schuh033df092019-01-21 19:46:48 -08001# 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
31EXAMPLE_COPTS = [
32 # Needed to silence GFlags complaints.
33 "-Wno-sign-compare",
34 "-Wno-unused-parameter",
Austin Schuh31f99a22024-06-25 18:30:13 -070035 # Needed to put fscanf in a function.
Austin Schuh033df092019-01-21 19:46:48 -080036 "-Wno-format-nonliteral",
37]
38
39EXAMPLE_DEPS = [
40 "//:ceres",
Alex Perrycb7da4b2019-08-28 19:35:56 -070041 "@org_tuxfamily_eigen//:eigen",
Austin Schuh033df092019-01-21 19:46:48 -080042 "@com_github_gflags_gflags//:gflags",
43]
44
45cc_binary(
46 name = "bundle_adjuster",
47 srcs = [
48 "bal_problem.cc",
49 "bal_problem.h",
50 "bundle_adjuster.cc",
Austin Schuh033df092019-01-21 19:46:48 -080051 "snavely_reprojection_error.h",
52 ],
53 copts = EXAMPLE_COPTS,
54 deps = EXAMPLE_DEPS,
55)
56
57cc_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
69cc_binary(
70 name = "robot_pose_mle",
71 srcs = [
Austin Schuh033df092019-01-21 19:46:48 -080072 "robot_pose_mle.cc",
73 ],
74 copts = EXAMPLE_COPTS,
75 deps = EXAMPLE_DEPS,
76)
77
78cc_binary(
79 name = "pose_graph_2d",
80 srcs = [
81 "slam/common/read_g2o.h",
Austin Schuh31f99a22024-06-25 18:30:13 -070082 "slam/pose_graph_2d/angle_manifold.h",
Austin Schuh033df092019-01-21 19:46:48 -080083 "slam/pose_graph_2d/normalize_angle.h",
84 "slam/pose_graph_2d/pose_graph_2d.cc",
85 "slam/pose_graph_2d/pose_graph_2d_error_term.h",
86 "slam/pose_graph_2d/types.h",
87 ],
88 copts = EXAMPLE_COPTS,
89 includes = ["slam"],
90 deps = EXAMPLE_DEPS,
91)
92
93cc_binary(
94 name = "pose_graph_3d",
95 srcs = [
96 "slam/common/read_g2o.h",
97 "slam/pose_graph_3d/pose_graph_3d.cc",
98 "slam/pose_graph_3d/pose_graph_3d_error_term.h",
99 "slam/pose_graph_3d/types.h",
100 ],
101 copts = EXAMPLE_COPTS,
102 includes = ["slam"],
103 deps = EXAMPLE_DEPS,
104)
105
106[cc_binary(
107 name = example,
108 srcs = [example + ".cc"],
109 copts = EXAMPLE_COPTS,
110 deps = EXAMPLE_DEPS,
111) for example in [
112 "circle_fit",
113 "curve_fitting",
114 "ellipse_approximation",
115 "helloworld",
116 "helloworld_analytic_diff",
117 "helloworld_numeric_diff",
118 "libmv_bundle_adjuster",
119 "libmv_homography",
120 "more_garbow_hillstrom",
121 "nist",
122 "powell",
123 "robust_curve_fitting",
124 "rosenbrock",
125 "sampled_function/sampled_function",
126 "simple_bundle_adjuster",
127]]