Export of internal Abseil changes.
-- ffe1bf0e5f98c77cf4193f24ae9ce94d16a72c6e by Alex Strelnikov <strel@google.com>: Remove accidental duplication of conanfile.py. PiperOrigin-RevId: 226926125 -- daf639ddd32c57d1c5ab99b26a9b15107f47ce16 by Derek Mauro <dmauro@google.com>: Fix the CMake build for absl::container. This target is deprecated and will be removed in the future. Fixes https://github.com/abseil/abseil-cpp/pull/238 PiperOrigin-RevId: 226921798 -- b8ab2bb9081c266ced1d966c86d5b19af6b5b3ef by Abseil Team <absl-team@google.com>: Cleanup: Fix some ClangTidy warnings. PiperOrigin-RevId: 226678127 -- 8cdc95316fc8baba00073c38a444c089ed2d5f5e by Abseil Team <absl-team@google.com>: Cleanup: Fix some ClangTidy warnings. PiperOrigin-RevId: 226567814 GitOrigin-RevId: ffe1bf0e5f98c77cf4193f24ae9ce94d16a72c6e Change-Id: Idfe30b8b3229082eb7db4bfa928d3257be7dce1a
This commit is contained in:
parent
7bd8f36c74
commit
01b471d9f3
6 changed files with 5 additions and 95 deletions
|
@ -95,8 +95,8 @@ Here's a non-exhaustive list of Abseil CMake public targets:
|
||||||
```cmake
|
```cmake
|
||||||
absl::base
|
absl::base
|
||||||
absl::algorithm
|
absl::algorithm
|
||||||
absl::container
|
|
||||||
absl::debugging
|
absl::debugging
|
||||||
|
absl::flat_hash_map
|
||||||
absl::memory
|
absl::memory
|
||||||
absl::meta
|
absl::meta
|
||||||
absl::numeric
|
absl::numeric
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Note: Conan is supported on a best-effort basis. Abseil doesn't use Conan
|
|
||||||
# internally, so we won't know if it stops working. We may ask community
|
|
||||||
# members to help us debug any problems that arise.
|
|
||||||
|
|
||||||
from conans import ConanFile, CMake, tools
|
|
||||||
from conans.errors import ConanInvalidConfiguration
|
|
||||||
from conans.model.version import Version
|
|
||||||
|
|
||||||
|
|
||||||
class AbseilConan(ConanFile):
|
|
||||||
name = "abseil"
|
|
||||||
url = "https://github.com/abseil/abseil-cpp"
|
|
||||||
homepage = url
|
|
||||||
author = "Abseil <abseil-io@googlegroups.com>"
|
|
||||||
description = "Abseil Common Libraries (C++) from Google"
|
|
||||||
license = "Apache-2.0"
|
|
||||||
topics = ("conan", "abseil", "abseil-cpp", "google", "common-libraries")
|
|
||||||
exports = ["LICENSE"]
|
|
||||||
exports_sources = ["CMakeLists.txt", "CMake/*", "absl/*"]
|
|
||||||
generators = "cmake"
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
|
|
||||||
def configure(self):
|
|
||||||
if self.settings.os == "Windows" and \
|
|
||||||
self.settings.compiler == "Visual Studio" and \
|
|
||||||
Version(self.settings.compiler.version.value) < "14":
|
|
||||||
raise ConanInvalidConfiguration("Abseil does not support MSVC < 14")
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
tools.replace_in_file("CMakeLists.txt", "project(absl)", "project(absl)\ninclude(conanbuildinfo.cmake)\nconan_basic_setup()")
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.definitions["BUILD_TESTING"] = False
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
self.copy("LICENSE", dst="licenses")
|
|
||||||
self.copy("*.h", dst="include", src="absl")
|
|
||||||
self.copy("*.inc", dst="include", src="absl")
|
|
||||||
self.copy("*.a", dst="lib", src=".", keep_path=False)
|
|
||||||
self.copy("*.lib", dst="lib", src=".", keep_path=False)
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.libs = ["absl_base",
|
|
||||||
"absl_synchronization",
|
|
||||||
"absl_strings",
|
|
||||||
"absl_symbolize",
|
|
||||||
"absl_malloc_internal",
|
|
||||||
"absl_time",
|
|
||||||
"absl_strings",
|
|
||||||
"absl_base",
|
|
||||||
"absl_dynamic_annotations",
|
|
||||||
"absl_spinlock_wait",
|
|
||||||
"absl_throw_delegate",
|
|
||||||
"absl_stacktrace",
|
|
||||||
"absl_int128",
|
|
||||||
"absl_span",
|
|
||||||
"test_instance_tracker_lib",
|
|
||||||
"absl_stack_consumption",
|
|
||||||
"absl_bad_any_cast",
|
|
||||||
"absl_hash",
|
|
||||||
"str_format_extension_internal",
|
|
||||||
"absl_failure_signal_handler",
|
|
||||||
"absl_str_format",
|
|
||||||
"absl_numeric",
|
|
||||||
"absl_any",
|
|
||||||
"absl_optional",
|
|
||||||
"absl_container",
|
|
||||||
"absl_debugging",
|
|
||||||
"absl_memory",
|
|
||||||
"absl_leak_check",
|
|
||||||
"absl_meta",
|
|
||||||
"absl_utility",
|
|
||||||
"str_format_internal",
|
|
||||||
"absl_variant",
|
|
||||||
"absl_examine_stack",
|
|
||||||
"absl_bad_optional_access",
|
|
||||||
"absl_algorithm"]
|
|
||||||
if self.settings.os == "Linux":
|
|
||||||
self.cpp_info.libs.append("pthread")
|
|
|
@ -20,10 +20,6 @@
|
||||||
absl_cc_library(
|
absl_cc_library(
|
||||||
NAME
|
NAME
|
||||||
container
|
container
|
||||||
SRCS
|
|
||||||
"internal/raw_hash_set.cc"
|
|
||||||
COPTS
|
|
||||||
${ABSL_DEFAULT_COPTS}
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -843,8 +843,8 @@ size_t Base64EscapeInternal(const unsigned char* src, size_t szsrc, char* dest,
|
||||||
|
|
||||||
// Three bytes of data encodes to four characters of cyphertext.
|
// Three bytes of data encodes to four characters of cyphertext.
|
||||||
// So we can pump through three-byte chunks atomically.
|
// So we can pump through three-byte chunks atomically.
|
||||||
if (szsrc >= 3) { // "limit_src - 3" is UB if szsrc < 3
|
if (szsrc >= 3) { // "limit_src - 3" is UB if szsrc < 3.
|
||||||
while (cur_src < limit_src - 3) { // as long as we have >= 32 bits
|
while (cur_src < limit_src - 3) { // While we have >= 32 bits.
|
||||||
uint32_t in = absl::big_endian::Load32(cur_src) >> 8;
|
uint32_t in = absl::big_endian::Load32(cur_src) >> 8;
|
||||||
|
|
||||||
cur_dest[0] = base64[in >> 18];
|
cur_dest[0] = base64[in >> 18];
|
||||||
|
|
|
@ -25,12 +25,12 @@ class ArgContext {
|
||||||
explicit ArgContext(absl::Span<const FormatArgImpl> pack) : pack_(pack) {}
|
explicit ArgContext(absl::Span<const FormatArgImpl> pack) : pack_(pack) {}
|
||||||
|
|
||||||
// Fill 'bound' with the results of applying the context's argument pack
|
// Fill 'bound' with the results of applying the context's argument pack
|
||||||
// to the specified 'props'. We synthesize a BoundConversion by
|
// to the specified 'unbound'. We synthesize a BoundConversion by
|
||||||
// lining up a UnboundConversion with a user argument. We also
|
// lining up a UnboundConversion with a user argument. We also
|
||||||
// resolve any '*' specifiers for width and precision, so after
|
// resolve any '*' specifiers for width and precision, so after
|
||||||
// this call, 'bound' has all the information it needs to be formatted.
|
// this call, 'bound' has all the information it needs to be formatted.
|
||||||
// Returns false on failure.
|
// Returns false on failure.
|
||||||
bool Bind(const UnboundConversion *props, BoundConversion *bound);
|
bool Bind(const UnboundConversion* unbound, BoundConversion* bound);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
absl::Span<const FormatArgImpl> pack_;
|
absl::Span<const FormatArgImpl> pack_;
|
||||||
|
|
|
@ -27,9 +27,6 @@
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
using testing::ElementsAre;
|
|
||||||
using testing::IsEmpty;
|
|
||||||
|
|
||||||
TEST(Strip, ConsumePrefixOneChar) {
|
TEST(Strip, ConsumePrefixOneChar) {
|
||||||
absl::string_view input("abc");
|
absl::string_view input("abc");
|
||||||
EXPECT_TRUE(absl::ConsumePrefix(&input, "a"));
|
EXPECT_TRUE(absl::ConsumePrefix(&input, "a"));
|
||||||
|
|
Loading…
Reference in a new issue