blob: 759881375db2f0c1cb323a70032698ad541452d8 [file] [log] [blame]
Austin Schuh70cc9552019-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# Authors: mierle@gmail.com (Keir Mierle)
30#
31# Bazel workspace file to enable building Ceres with Bazel.
32
33workspace(name = "com_google_ceres_solver")
34
35# External dependency: Google Flags; has Bazel build already.
36http_archive(
37 name = "com_github_gflags_gflags",
38 sha256 = "6e16c8bc91b1310a44f3965e616383dbda48f83e8c1eaa2370a215057b00cabe",
39 strip_prefix = "gflags-77592648e3f3be87d6c7123eb81cbad75f9aef5a",
40 urls = [
41 "https://mirror.bazel.build/github.com/gflags/gflags/archive/77592648e3f3be87d6c7123eb81cbad75f9aef5a.tar.gz",
42 "https://github.com/gflags/gflags/archive/77592648e3f3be87d6c7123eb81cbad75f9aef5a.tar.gz",
43 ],
44)
45
46# External dependency: Google Log; has Bazel build already.
47http_archive(
48 name = "com_github_google_glog",
49 sha256 = "7083af285bed3995b5dc2c982f7de39bced9f0e6fd78d631f3285490922a0c3d",
50 strip_prefix = "glog-3106945d8d3322e5cbd5658d482c9ffed2d892c0",
51 urls = [
52 "https://github.com/drigz/glog/archive/3106945d8d3322e5cbd5658d482c9ffed2d892c0.tar.gz",
53 ],
54)
55
56# External dependency: Eigen; has no Bazel build.
57new_http_archive(
58 name = "com_github_eigen_eigen",
59 build_file = "bazel/eigen.BUILD",
60 sha256 = "dd254beb0bafc695d0f62ae1a222ff85b52dbaa3a16f76e781dce22d0d20a4a6",
61 strip_prefix = "eigen-eigen-5a0156e40feb",
62 urls = [
63 "http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2",
64 ],
65)
66
67# External dependency: Google Benchmark; has no Bazel build.
68new_http_archive(
69 name = "com_github_google_benchmark",
70 urls = ["https://github.com/google/benchmark/archive/56f52ee228783547f544d9ac4a533574b9010e3f.zip"],
71 sha256 = "8c1c6e90cd320b07504fabb86400f390faff2e599183ebd9396908817968ae79",
72 strip_prefix = "benchmark-56f52ee228783547f544d9ac4a533574b9010e3f",
73 build_file_content =
74"""
75cc_library(
76 name = "benchmark",
77 srcs = glob([
78 "src/*.h",
79 "src/*.cc",
80 ]),
81 hdrs = glob(["include/benchmark/*.h"]),
82 copts = [
83 "-DHAVE_STD_REGEX",
84 ],
85 includes = [
86 "include",
87 ],
88 visibility = ["//visibility:public"],
89)
90"""
91)