Commit Graph

4 Commits

Author SHA1 Message Date
Sergiu Deitsch 8a545eb46b Update dependencies to support GCC 15
Previously, compiling using GCC failed with

  In file included from /usr/include/c++/15.1.1/cassert:46,
                   from <ceres-prefix>/third_party/abseil-cpp/absl/container/internal/container_memory.h:18,
                   from <ceres-prefix>/third_party/abseil-cpp/absl/container/flat_hash_map.h:40,
                   from <ceres-prefix>/third_party/abseil-cpp/absl/flags/reflection.h:29,
                   from <ceres-prefix>/third_party/abseil-cpp/absl/flags/reflection.cc:16:
  <ceres-prefix>/third_party/abseil-cpp/absl/container/internal/container_memory.h: In function ‘void* absl::lts_20240116::container_internal::Allocate(Alloc*, size_t)’:
  <ceres-prefix>/third_party/abseil-cpp/absl/container/internal/container_memory.h:66:27: error: ‘uintptr_t’ does not name a type [-Wtemplate-body]
     66 |   assert(reinterpret_cast<uintptr_t>(p) % Alignment == 0 &&
        |                           ^~~~~~~~~
  <ceres-prefix>/third_party/abseil-cpp/absl/container/internal/container_memory.h:31:1: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
     30 | #include "absl/utility/utility.h"
    +++ |+#include <cstdint>
     31 |

Additionally, the previous version of Abseil errouneously depends on
googletest when Ceres is consumed which results in issues with
downstream projects. We therefore update both dependencies to avoid
these issues.

Thanks to @adam-ce for figuring out the working versions of Abseil and
googletest.

Fixes #1140

Change-Id: Ie991da04491d42979d51b891a4565cabbb1c604b
2025-06-08 13:23:29 +02:00
Sameer Agarwal 0a53aa9054 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
2024-07-18 00:24:49 -07:00
Sameer Agarwal 21b026aa2c Use googletest branch v1.14.x
Change-Id: I09d59a2690bd3c46595f8a4938f520add86e3a63
2024-07-09 23:00:07 +00:00
Sameer Agarwal 894fd6903c Update the googletest version
We now use googletest as a git submodule instead
of the old way of converting it into a single header
and including it in the source.

This removes the dependence on googleflags for tests
to be enabled.

Change-Id: If25ea3ba7a39c2b8ba9c6effbed3e7173361b6b1
2024-07-07 09:15:27 -07:00