BUILD 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. "random.h",
  48. "snavely_reprojection_error.h",
  49. ],
  50. copts = EXAMPLE_COPTS,
  51. deps = EXAMPLE_DEPS,
  52. )
  53. cc_binary(
  54. name = "denoising",
  55. srcs = [
  56. "denoising.cc",
  57. "fields_of_experts.cc",
  58. "fields_of_experts.h",
  59. "pgm_image.h",
  60. ],
  61. copts = EXAMPLE_COPTS,
  62. deps = EXAMPLE_DEPS,
  63. )
  64. cc_binary(
  65. name = "robot_pose_mle",
  66. srcs = [
  67. "random.h",
  68. "robot_pose_mle.cc",
  69. ],
  70. copts = EXAMPLE_COPTS,
  71. deps = EXAMPLE_DEPS,
  72. )
  73. cc_binary(
  74. name = "pose_graph_2d",
  75. srcs = [
  76. "slam/common/read_g2o.h",
  77. "slam/pose_graph_2d/angle_local_parameterization.h",
  78. "slam/pose_graph_2d/normalize_angle.h",
  79. "slam/pose_graph_2d/pose_graph_2d.cc",
  80. "slam/pose_graph_2d/pose_graph_2d_error_term.h",
  81. "slam/pose_graph_2d/types.h",
  82. ],
  83. copts = EXAMPLE_COPTS,
  84. includes = ["slam"],
  85. deps = EXAMPLE_DEPS,
  86. )
  87. cc_binary(
  88. name = "pose_graph_3d",
  89. srcs = [
  90. "slam/common/read_g2o.h",
  91. "slam/pose_graph_3d/pose_graph_3d.cc",
  92. "slam/pose_graph_3d/pose_graph_3d_error_term.h",
  93. "slam/pose_graph_3d/types.h",
  94. ],
  95. copts = EXAMPLE_COPTS,
  96. includes = ["slam"],
  97. deps = EXAMPLE_DEPS,
  98. )
  99. [cc_binary(
  100. name = example,
  101. srcs = [example + ".cc"],
  102. copts = EXAMPLE_COPTS,
  103. deps = EXAMPLE_DEPS,
  104. ) for example in [
  105. "circle_fit",
  106. "curve_fitting",
  107. "ellipse_approximation",
  108. "helloworld",
  109. "helloworld_analytic_diff",
  110. "helloworld_numeric_diff",
  111. "libmv_bundle_adjuster",
  112. "libmv_homography",
  113. "more_garbow_hillstrom",
  114. "nist",
  115. "powell",
  116. "robust_curve_fitting",
  117. "rosenbrock",
  118. "sampled_function/sampled_function",
  119. "simple_bundle_adjuster",
  120. ]]