blob: 7264bedabc9807290a8fa67e952d194c55b2867c [file] [log] [blame]
Keir Mierle07f14052017-11-07 01:13:29 -08001# Ceres Solver - A fast non-linear least squares minimizer
Keir Mierle3f826ef2018-01-12 14:09:02 -08002# Copyright 2018 Google Inc. All rights reserved.
Keir Mierle07f14052017-11-07 01:13:29 -08003# 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
Rodrigo Queiroac22a972018-01-15 12:55:57 +010033workspace(name = "com_google_ceres_solver")
Keir Mierle07f14052017-11-07 01:13:29 -080034
Keir Mierle0f57fa82019-04-16 01:04:01 -070035load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
36
Keir Mierle07f14052017-11-07 01:13:29 -080037# External dependency: Google Flags; has Bazel build already.
38http_archive(
39 name = "com_github_gflags_gflags",
40 sha256 = "6e16c8bc91b1310a44f3965e616383dbda48f83e8c1eaa2370a215057b00cabe",
41 strip_prefix = "gflags-77592648e3f3be87d6c7123eb81cbad75f9aef5a",
42 urls = [
43 "https://mirror.bazel.build/github.com/gflags/gflags/archive/77592648e3f3be87d6c7123eb81cbad75f9aef5a.tar.gz",
44 "https://github.com/gflags/gflags/archive/77592648e3f3be87d6c7123eb81cbad75f9aef5a.tar.gz",
45 ],
46)
47
48# External dependency: Google Log; has Bazel build already.
49http_archive(
50 name = "com_github_google_glog",
Rodrigo Queiroc12aae52018-01-16 13:45:31 +010051 sha256 = "7083af285bed3995b5dc2c982f7de39bced9f0e6fd78d631f3285490922a0c3d",
52 strip_prefix = "glog-3106945d8d3322e5cbd5658d482c9ffed2d892c0",
Keir Mierle07f14052017-11-07 01:13:29 -080053 urls = [
Rodrigo Queiroc12aae52018-01-16 13:45:31 +010054 "https://github.com/drigz/glog/archive/3106945d8d3322e5cbd5658d482c9ffed2d892c0.tar.gz",
Keir Mierle07f14052017-11-07 01:13:29 -080055 ],
56)
57
Keir Mierle3f826ef2018-01-12 14:09:02 -080058# External dependency: Eigen; has no Bazel build.
Keir Mierle0f57fa82019-04-16 01:04:01 -070059http_archive(
Rodrigo Queiroac22a972018-01-15 12:55:57 +010060 name = "com_github_eigen_eigen",
Keir Mierle07f14052017-11-07 01:13:29 -080061 sha256 = "dd254beb0bafc695d0f62ae1a222ff85b52dbaa3a16f76e781dce22d0d20a4a6",
62 strip_prefix = "eigen-eigen-5a0156e40feb",
63 urls = [
Rodrigo Queiroac22a972018-01-15 12:55:57 +010064 "http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2",
Keir Mierle07f14052017-11-07 01:13:29 -080065 ],
Keir Mierle0f57fa82019-04-16 01:04:01 -070066 build_file_content =
67"""
68# TODO(keir): Replace this with a better version, like from TensorFlow.
69# See https://github.com/ceres-solver/ceres-solver/issues/337.
70cc_library(
71 name = 'eigen',
72 srcs = [],
73 includes = ['.'],
74 hdrs = glob(['Eigen/**']),
75 visibility = ['//visibility:public'],
76)
77"""
Keir Mierle07f14052017-11-07 01:13:29 -080078)
Keir Mierle22fa21c2018-02-25 15:18:08 -080079
80# External dependency: Google Benchmark; has no Bazel build.
Keir Mierle0f57fa82019-04-16 01:04:01 -070081http_archive(
Keir Mierle22fa21c2018-02-25 15:18:08 -080082 name = "com_github_google_benchmark",
83 urls = ["https://github.com/google/benchmark/archive/56f52ee228783547f544d9ac4a533574b9010e3f.zip"],
84 sha256 = "8c1c6e90cd320b07504fabb86400f390faff2e599183ebd9396908817968ae79",
85 strip_prefix = "benchmark-56f52ee228783547f544d9ac4a533574b9010e3f",
86 build_file_content =
87"""
88cc_library(
89 name = "benchmark",
90 srcs = glob([
91 "src/*.h",
92 "src/*.cc",
93 ]),
94 hdrs = glob(["include/benchmark/*.h"]),
95 copts = [
96 "-DHAVE_STD_REGEX",
97 ],
98 includes = [
99 "include",
100 ],
101 visibility = ["//visibility:public"],
102)
103"""
104)