mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 09:00:37 +08:00
Take abseil as a dependency
1. Add abseil-cpp as a submodule. We are tracking the latest LTS release, which is lts_2024_01_16. 2. Replace glog/gflags with absl::log and absl::flags. 3. Remove miniglog 4. Also take a whack at making the bazel build work with abseil-cpp and gtest. There are a number of TODOs in this CL that still need to be resolved. Change-Id: I39355ed7d61375be4ebcbc8596d9cc70acc1c678
This commit is contained in:
@@ -29,4 +29,4 @@
|
||||
# Author: vitus@google.com (Michael Vitus)
|
||||
|
||||
add_executable(sampled_function sampled_function.cc)
|
||||
target_link_libraries(sampled_function PRIVATE Ceres::ceres)
|
||||
target_link_libraries(sampled_function PRIVATE absl::log_initialize Ceres::ceres)
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
// A simple example of optimizing a sampled function by using cubic
|
||||
// interpolation.
|
||||
|
||||
#include "absl/log/initialize.h"
|
||||
#include "ceres/ceres.h"
|
||||
#include "ceres/cubic_interpolation.h"
|
||||
#include "glog/logging.h"
|
||||
|
||||
using Interpolator = ceres::CubicInterpolator<ceres::Grid1D<double>>;
|
||||
|
||||
@@ -59,8 +59,7 @@ struct InterpolatedCostFunctor {
|
||||
};
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
google::InitGoogleLogging(argv[0]);
|
||||
|
||||
absl::InitializeLog();
|
||||
// Evaluate the function f(x) = (x - 4.5)^2;
|
||||
const int kNumSamples = 10;
|
||||
double values[kNumSamples];
|
||||
|
||||
Reference in New Issue
Block a user