BUILD 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. EXAMPLE_COPTS = [
  31. # Needed to silence GFlags complaints.
  32. "-Wno-sign-compare",
  33. # Needed to put fscanf in a function.
  34. "-Wno-format-nonliteral",
  35. ]
  36. EXAMPLE_DEPS = [
  37. "//:ceres",
  38. "@com_gitlab_libeigen_eigen//:eigen",
  39. "@com_github_gflags_gflags//:gflags",
  40. ]
  41. cc_binary(
  42. name = "bundle_adjuster",
  43. srcs = [
  44. "bal_problem.cc",
  45. "bal_problem.h",
  46. "bundle_adjuster.cc",
  47. "snavely_reprojection_error.h",
  48. ],
  49. copts = EXAMPLE_COPTS,
  50. deps = EXAMPLE_DEPS,
  51. )
  52. cc_binary(
  53. name = "denoising",
  54. srcs = [
  55. "denoising.cc",
  56. "fields_of_experts.cc",
  57. "fields_of_experts.h",
  58. "pgm_image.h",
  59. ],
  60. copts = EXAMPLE_COPTS,
  61. deps = EXAMPLE_DEPS,
  62. )
  63. cc_binary(
  64. name = "robot_pose_mle",
  65. srcs = [
  66. "robot_pose_mle.cc",
  67. ],
  68. copts = EXAMPLE_COPTS,
  69. deps = EXAMPLE_DEPS,
  70. )
  71. cc_binary(
  72. name = "pose_graph_2d",
  73. srcs = [
  74. "slam/common/read_g2o.h",
  75. "slam/pose_graph_2d/angle_manifold.h",
  76. "slam/pose_graph_2d/normalize_angle.h",
  77. "slam/pose_graph_2d/pose_graph_2d.cc",
  78. "slam/pose_graph_2d/pose_graph_2d_error_term.h",
  79. "slam/pose_graph_2d/types.h",
  80. ],
  81. copts = EXAMPLE_COPTS,
  82. includes = ["slam"],
  83. deps = EXAMPLE_DEPS,
  84. )
  85. cc_binary(
  86. name = "pose_graph_3d",
  87. srcs = [
  88. "slam/common/read_g2o.h",
  89. "slam/pose_graph_3d/pose_graph_3d.cc",
  90. "slam/pose_graph_3d/pose_graph_3d_error_term.h",
  91. "slam/pose_graph_3d/types.h",
  92. ],
  93. copts = EXAMPLE_COPTS,
  94. includes = ["slam"],
  95. deps = EXAMPLE_DEPS,
  96. )
  97. [cc_binary(
  98. name = example,
  99. srcs = [example + ".cc"],
  100. copts = EXAMPLE_COPTS,
  101. deps = EXAMPLE_DEPS,
  102. ) for example in [
  103. "circle_fit",
  104. "curve_fitting",
  105. "ellipse_approximation",
  106. "helloworld",
  107. "helloworld_analytic_diff",
  108. "helloworld_numeric_diff",
  109. "libmv_bundle_adjuster",
  110. "libmv_homography",
  111. "more_garbow_hillstrom",
  112. "nist",
  113. "powell",
  114. "robust_curve_fitting",
  115. "rosenbrock",
  116. "sampled_function/sampled_function",
  117. "simple_bundle_adjuster",
  118. ]]