Keir Mierle | 07f1405 | 2017-11-07 01:13:29 -0800 | [diff] [blame] | 1 | # Ceres Solver - A fast non-linear least squares minimizer |
Keir Mierle | 3f826ef | 2018-01-12 14:09:02 -0800 | [diff] [blame] | 2 | # Copyright 2018 Google Inc. All rights reserved. |
Keir Mierle | 07f1405 | 2017-11-07 01:13:29 -0800 | [diff] [blame] | 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 | |
Rodrigo Queiro | ac22a97 | 2018-01-15 12:55:57 +0100 | [diff] [blame] | 33 | workspace(name = "com_google_ceres_solver") |
Keir Mierle | 07f1405 | 2017-11-07 01:13:29 -0800 | [diff] [blame] | 34 | |
Keir Mierle | 0f57fa8 | 2019-04-16 01:04:01 -0700 | [diff] [blame] | 35 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 36 | |
Keir Mierle | 07f1405 | 2017-11-07 01:13:29 -0800 | [diff] [blame] | 37 | # External dependency: Google Flags; has Bazel build already. |
| 38 | http_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. |
| 49 | http_archive( |
| 50 | name = "com_github_google_glog", |
Rodrigo Queiro | c12aae5 | 2018-01-16 13:45:31 +0100 | [diff] [blame] | 51 | sha256 = "7083af285bed3995b5dc2c982f7de39bced9f0e6fd78d631f3285490922a0c3d", |
| 52 | strip_prefix = "glog-3106945d8d3322e5cbd5658d482c9ffed2d892c0", |
Keir Mierle | 07f1405 | 2017-11-07 01:13:29 -0800 | [diff] [blame] | 53 | urls = [ |
Rodrigo Queiro | c12aae5 | 2018-01-16 13:45:31 +0100 | [diff] [blame] | 54 | "https://github.com/drigz/glog/archive/3106945d8d3322e5cbd5658d482c9ffed2d892c0.tar.gz", |
Keir Mierle | 07f1405 | 2017-11-07 01:13:29 -0800 | [diff] [blame] | 55 | ], |
| 56 | ) |
| 57 | |
Keir Mierle | 3f826ef | 2018-01-12 14:09:02 -0800 | [diff] [blame] | 58 | # External dependency: Eigen; has no Bazel build. |
Keir Mierle | 0f57fa8 | 2019-04-16 01:04:01 -0700 | [diff] [blame] | 59 | http_archive( |
Rodrigo Queiro | ac22a97 | 2018-01-15 12:55:57 +0100 | [diff] [blame] | 60 | name = "com_github_eigen_eigen", |
Keir Mierle | 07f1405 | 2017-11-07 01:13:29 -0800 | [diff] [blame] | 61 | sha256 = "dd254beb0bafc695d0f62ae1a222ff85b52dbaa3a16f76e781dce22d0d20a4a6", |
| 62 | strip_prefix = "eigen-eigen-5a0156e40feb", |
| 63 | urls = [ |
Rodrigo Queiro | ac22a97 | 2018-01-15 12:55:57 +0100 | [diff] [blame] | 64 | "http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2", |
Keir Mierle | 07f1405 | 2017-11-07 01:13:29 -0800 | [diff] [blame] | 65 | ], |
Keir Mierle | 0f57fa8 | 2019-04-16 01:04:01 -0700 | [diff] [blame] | 66 | 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. |
| 70 | cc_library( |
| 71 | name = 'eigen', |
| 72 | srcs = [], |
| 73 | includes = ['.'], |
| 74 | hdrs = glob(['Eigen/**']), |
| 75 | visibility = ['//visibility:public'], |
| 76 | ) |
| 77 | """ |
Keir Mierle | 07f1405 | 2017-11-07 01:13:29 -0800 | [diff] [blame] | 78 | ) |
Keir Mierle | 22fa21c | 2018-02-25 15:18:08 -0800 | [diff] [blame] | 79 | |
| 80 | # External dependency: Google Benchmark; has no Bazel build. |
Keir Mierle | 0f57fa8 | 2019-04-16 01:04:01 -0700 | [diff] [blame] | 81 | http_archive( |
Keir Mierle | 22fa21c | 2018-02-25 15:18:08 -0800 | [diff] [blame] | 82 | 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 | """ |
| 88 | cc_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 | ) |