Commit Graph

9 Commits

Author SHA1 Message Date
Sameer Agarwal 77c0c4d09c Migrate examples to use Manifolds
Also change NULL to nullptr.

Change-Id: I80a2328185d7891f61e07e64d5c1b59e74588ac7
2022-01-22 11:18:19 -08:00
Sameer Agarwal 98f639f542 Add a macro CERES_GET_FLAG.
This is needed to add a layer of indirection which will allow
us to use gflags in the public version and absl inside Google.

Change-Id: I32f3da23200a01c9b658bbf8aaa66cb8fddc2cc3
2021-03-18 11:07:57 -07:00
Nikolaus Demmel 7b6b2491cc fix formatting for examples
This is mostly just applying the existing clang format config, except:
- Use NOLINT on overlong comment lines.
- Wrap some sections in 'clang-format off' / 'clang format on'.
- Manually split or join some multi-line strings.

Change-Id: Ia1a40eeb92112e12c3a169309afe087af55b2f4f
2020-09-08 17:56:39 +02:00
NeroBurner a548766d14 Use glfags target
Update the usage of Google Flags (gflags) library the same way Glog
updated it [1]. This pushes the minimum required gflags version to
v2.2.0.

Remove the ceres specific define of CERES_GFLAGS_NAMESPACE and directly
use GFLAGS_NAMESPACE defined in gflags/gflags_declare.h [2].

In CeresConfig.cmake the hard coded paths for gflags are ommited.
Instead we rely on the gflagsConfig file to get closer to a relocatable
CeresConfig.cmake.
Furthermore use the find_dependency() [4] cmake function specifically
created for cmake-config files.

This change builds upon the explicit PUBLIC/PRIVATE link change [3].

[1] https://github.com/google/glog/pull/199
[2] https://github.com/gflags/gflags/blob/d9b184bd0026b16bb4c2fded75d56fb2cce50d66/src/gflags_declare.h.in#L43
[3] https://ceres-solver-review.googlesource.com/c/ceres-solver/+/16220
[4] https://cmake.org/cmake/help/latest/module/CMakeFindDependencyMacro.html

Change-Id: I9861a2699f2702bf1a5e99d07863a7e6639b7c39
2019-12-12 14:00:59 +00:00
Keir Mierle 7492b0d8de Update copyright headers with new year and URL
Since Ceres is moving to using GitHub for issues, and the Google
Code URL in the current copyright header will soon become invalid,
update all the headers.

Change-Id: I1fce70375d1bcf098591f07b4d8f01a5c1e0789c
2015-03-18 05:43:23 +00:00
Alex Stewart cbe694505e Autodetect gflags namespace.
- At version 2.1, gflags changed from using the google namespace, to
  using gflags by default.  However, it can be configured at build time
  to be something else (which would be google for legacy compatibility
  unless you were evil).
- Ceres previously assumed that gflags was in the google namespace.
- Now, FindGFlags.cmake extracts the namespace when gflags.h is found
  and saves it in GFLAGS_NAMESPACE.
- When building the tests and examples that require gflags,
  CERES_GFLAGS_NAMESPACE is defined to be the detected namespace, and
  all tests/examples now use CERES_GFLAGS_NAMESPACE:: instead of
  google:: when calling gflags functions.

Change-Id: Ia333df7a7e2f08ba9f26bbd339c3a785b88f04c4
2014-11-27 09:56:37 +00:00
Sameer Agarwal 4b0404352d data_fitting.cc should include gflags.
Also fix glog/gflag includes and sorting in examples.

Change-Id: Ie07563b99cbb9172c941bb8f5fb7decb95fbb5d1
2012-08-13 15:09:34 -07:00
Sameer Agarwal 6447219826 1. Changes the tutorial to refer to BriefReport.
2. Some of the enums have commas at the end.
3. Fix a bug in the default value of circle_fit.cc in the examples.
2012-05-03 21:53:07 -07:00
Keir Mierle 8ebb073038 Initial commit of Ceres Solver. 2012-04-30 23:09:08 -07:00