Export of internal Abseil changes.
-- a2adbf75201f6b7feba929f77dfc4f87f9c1110b by Abseil Team <absl-team@google.com>: This change allows for capturing the address of the mutex from which a call to `Block(...)` could be introducing latency. The attribute is a no-op if the application is not being built with XRay instrumentation. See http://llvm.org/docs/XRay.html for more information about XRay. PiperOrigin-RevId: 225752598 -- 6bc7f25573ddc6711f484dfacab9459f45e0bf42 by Abseil Team <absl-team@google.com>: Update absl/utility/CMakeLists.txt to use new functions i.e. absl_cc_(library|test) PiperOrigin-RevId: 225651883 -- 4acde5e72032f31a26a1ffa53a28f35dbb0bd7d3 by Abseil Team <absl-team@google.com>: Update absl/types/CMakeLists.txt to use new functions i.e. absl_cc_(library|test) PiperOrigin-RevId: 225584788 -- fe2c740d64b17cece25eee4e5d2196a7c059d3e9 by Abseil Team <absl-team@google.com>: Update auto-generated build options files. PiperOrigin-RevId: 225557283 -- cd779dddceeee191ee82deb6b9030c4db288e758 by Jon Cohen <cohenjon@google.com>: Internal change. PiperOrigin-RevId: 225556657 -- 3d56dd132d845930c3fb520a39ee77ecb2430bd2 by Matt Kulukundis <kfm@google.com>: Internal cleanup PiperOrigin-RevId: 225488946 GitOrigin-RevId: a2adbf75201f6b7feba929f77dfc4f87f9c1110b Change-Id: I1b2178e053bdebc8cf3dcb017b0e247619b81a0c
This commit is contained in:
		
							parent
							
								
									389ec3f906
								
							
						
					
					
						commit
						111ca7060a
					
				
					 13 changed files with 381 additions and 258 deletions
				
			
		| 
						 | 
				
			
			@ -135,7 +135,9 @@ function(absl_cc_library)
 | 
			
		|||
    endif()
 | 
			
		||||
 | 
			
		||||
    # Check if this is a header-only library
 | 
			
		||||
    if ("${ABSL_CC_LIB_SRCS}" STREQUAL "")
 | 
			
		||||
    set(ABSL_CC_SRCS "${ABSL_CC_LIB_SRCS}")
 | 
			
		||||
    list(FILTER ABSL_CC_SRCS EXCLUDE REGEX ".*\\.h")
 | 
			
		||||
    if ("${ABSL_CC_SRCS}" STREQUAL "")
 | 
			
		||||
      set(ABSL_CC_LIB_IS_INTERFACE 1)
 | 
			
		||||
    else()
 | 
			
		||||
      set(ABSL_CC_LIB_IS_INTERFACE 0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,9 +48,6 @@ include(AbseilHelpers)
 | 
			
		|||
# include current path
 | 
			
		||||
list(APPEND ABSL_COMMON_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
 | 
			
		||||
 | 
			
		||||
# -fexceptions
 | 
			
		||||
set(ABSL_EXCEPTIONS_FLAG "${CMAKE_CXX_EXCEPTIONS}")
 | 
			
		||||
 | 
			
		||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
 | 
			
		||||
  set(ABSL_USING_CLANG ON)
 | 
			
		||||
else()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -181,10 +181,11 @@ absl_cc_library(
 | 
			
		|||
  SRCS
 | 
			
		||||
    "internal/exception_safety_testing.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::base
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::pretty_function
 | 
			
		||||
    absl::memory
 | 
			
		||||
| 
						 | 
				
			
			@ -201,6 +202,7 @@ absl_cc_test(
 | 
			
		|||
  SRCS
 | 
			
		||||
    "exception_safety_testing_test.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,9 +17,9 @@
 | 
			
		|||
load(
 | 
			
		||||
    "//absl:copts/configure_copts.bzl",
 | 
			
		||||
    "ABSL_DEFAULT_COPTS",
 | 
			
		||||
    "ABSL_TEST_COPTS",
 | 
			
		||||
    "ABSL_EXCEPTIONS_FLAG",
 | 
			
		||||
    "ABSL_EXCEPTIONS_FLAG_LINKOPTS",
 | 
			
		||||
    "ABSL_TEST_COPTS",
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
package(default_visibility = ["//visibility:public"])
 | 
			
		||||
| 
						 | 
				
			
			@ -463,6 +463,12 @@ cc_library(
 | 
			
		|||
    ],
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
cc_library(
 | 
			
		||||
    name = "have_sse",
 | 
			
		||||
    hdrs = ["internal/have_sse.h"],
 | 
			
		||||
    copts = ABSL_DEFAULT_COPTS,
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
cc_library(
 | 
			
		||||
    name = "raw_hash_set",
 | 
			
		||||
    srcs = ["internal/raw_hash_set.cc"],
 | 
			
		||||
| 
						 | 
				
			
			@ -473,6 +479,7 @@ cc_library(
 | 
			
		|||
        ":container_memory",
 | 
			
		||||
        ":hash_policy_traits",
 | 
			
		||||
        ":hashtable_debug_hooks",
 | 
			
		||||
        ":have_sse",
 | 
			
		||||
        ":layout",
 | 
			
		||||
        "//absl/base:bits",
 | 
			
		||||
        "//absl/base:config",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -452,6 +452,16 @@ absl_cc_library(
 | 
			
		|||
  PUBLIC
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_cc_library(
 | 
			
		||||
  NAME
 | 
			
		||||
    have_sse
 | 
			
		||||
  HDRS
 | 
			
		||||
    "internal/have_sse.h"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
  PUBLIC
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_cc_library(
 | 
			
		||||
  NAME
 | 
			
		||||
    node_hash_policy
 | 
			
		||||
| 
						 | 
				
			
			@ -496,15 +506,16 @@ absl_cc_library(
 | 
			
		|||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::compressed_tuple
 | 
			
		||||
    absl::container_memory
 | 
			
		||||
    absl::hash_policy_traits
 | 
			
		||||
    absl::hashtable_debug_hooks
 | 
			
		||||
    absl::layout
 | 
			
		||||
    absl::bits
 | 
			
		||||
    absl::compressed_tuple
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::container_memory
 | 
			
		||||
    absl::core_headers
 | 
			
		||||
    absl::endian
 | 
			
		||||
    absl::hash_policy_traits
 | 
			
		||||
    absl::hashtable_debug_hooks
 | 
			
		||||
    absl::have_sse
 | 
			
		||||
    absl::layout
 | 
			
		||||
    absl::memory
 | 
			
		||||
    absl::meta
 | 
			
		||||
    absl::optional
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										49
									
								
								absl/container/internal/have_sse.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								absl/container/internal/have_sse.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,49 @@
 | 
			
		|||
// Copyright 2018 The Abseil Authors.
 | 
			
		||||
//
 | 
			
		||||
// Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
// you may not use this file except in compliance with the License.
 | 
			
		||||
// You may obtain a copy of the License at
 | 
			
		||||
//
 | 
			
		||||
//      http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
//
 | 
			
		||||
// Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
// distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
// See the License for the specific language governing permissions and
 | 
			
		||||
// limitations under the License.
 | 
			
		||||
//
 | 
			
		||||
// Shared config probing for SSE instructions used in Swiss tables.
 | 
			
		||||
#ifndef ABSL_CONTAINER_INTERNAL_HAVE_SSE_H_
 | 
			
		||||
#define ABSL_CONTAINER_INTERNAL_HAVE_SSE_H_
 | 
			
		||||
 | 
			
		||||
#ifndef SWISSTABLE_HAVE_SSE2
 | 
			
		||||
#if defined(__SSE2__) ||  \
 | 
			
		||||
    (defined(_MSC_VER) && \
 | 
			
		||||
     (defined(_M_X64) || (defined(_M_IX86) && _M_IX86_FP >= 2)))
 | 
			
		||||
#define SWISSTABLE_HAVE_SSE2 1
 | 
			
		||||
#else
 | 
			
		||||
#define SWISSTABLE_HAVE_SSE2 0
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef SWISSTABLE_HAVE_SSSE3
 | 
			
		||||
#ifdef __SSSE3__
 | 
			
		||||
#define SWISSTABLE_HAVE_SSSE3 1
 | 
			
		||||
#else
 | 
			
		||||
#define SWISSTABLE_HAVE_SSSE3 0
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if SWISSTABLE_HAVE_SSSE3 && !SWISSTABLE_HAVE_SSE2
 | 
			
		||||
#error "Bad configuration!"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if SWISSTABLE_HAVE_SSE2
 | 
			
		||||
#include <emmintrin.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if SWISSTABLE_HAVE_SSSE3
 | 
			
		||||
#include <tmmintrin.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif  // ABSL_CONTAINER_INTERNAL_HAVE_SSE_H_
 | 
			
		||||
| 
						 | 
				
			
			@ -91,36 +91,6 @@
 | 
			
		|||
#ifndef ABSL_CONTAINER_INTERNAL_RAW_HASH_SET_H_
 | 
			
		||||
#define ABSL_CONTAINER_INTERNAL_RAW_HASH_SET_H_
 | 
			
		||||
 | 
			
		||||
#ifndef SWISSTABLE_HAVE_SSE2
 | 
			
		||||
#if defined(__SSE2__) ||  \
 | 
			
		||||
    (defined(_MSC_VER) && \
 | 
			
		||||
     (defined(_M_X64) || (defined(_M_IX86) && _M_IX86_FP >= 2)))
 | 
			
		||||
#define SWISSTABLE_HAVE_SSE2 1
 | 
			
		||||
#else
 | 
			
		||||
#define SWISSTABLE_HAVE_SSE2 0
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef SWISSTABLE_HAVE_SSSE3
 | 
			
		||||
#ifdef __SSSE3__
 | 
			
		||||
#define SWISSTABLE_HAVE_SSSE3 1
 | 
			
		||||
#else
 | 
			
		||||
#define SWISSTABLE_HAVE_SSSE3 0
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if SWISSTABLE_HAVE_SSSE3 && !SWISSTABLE_HAVE_SSE2
 | 
			
		||||
#error "Bad configuration!"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if SWISSTABLE_HAVE_SSE2
 | 
			
		||||
#include <emmintrin.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if SWISSTABLE_HAVE_SSSE3
 | 
			
		||||
#include <tmmintrin.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
#include <cmath>
 | 
			
		||||
#include <cstdint>
 | 
			
		||||
| 
						 | 
				
			
			@ -139,6 +109,7 @@
 | 
			
		|||
#include "absl/container/internal/container_memory.h"
 | 
			
		||||
#include "absl/container/internal/hash_policy_traits.h"
 | 
			
		||||
#include "absl/container/internal/hashtable_debug_hooks.h"
 | 
			
		||||
#include "absl/container/internal/have_sse.h"
 | 
			
		||||
#include "absl/container/internal/layout.h"
 | 
			
		||||
#include "absl/memory/memory.h"
 | 
			
		||||
#include "absl/meta/type_traits.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
# GENERATED! DO NOT MANUALLY EDIT THIS FILE.
 | 
			
		||||
#
 | 
			
		||||
# (1) Edit absl/copts/copts.py.
 | 
			
		||||
# (2) Run `<path_to_absl>/copts/generate_copts.py`.
 | 
			
		||||
# (2) Run `python <path_to_absl>/copts/generate_copts.py`.
 | 
			
		||||
 | 
			
		||||
list(APPEND GCC_EXCEPTIONS_FLAGS
 | 
			
		||||
    "-fexceptions"
 | 
			
		||||
| 
						 | 
				
			
			@ -48,6 +48,7 @@ list(APPEND LLVM_FLAGS
 | 
			
		|||
    "-Wno-double-promotion"
 | 
			
		||||
    "-Wno-comma"
 | 
			
		||||
    "-Wno-extra-semi"
 | 
			
		||||
    "-Wno-extra-semi-stmt"
 | 
			
		||||
    "-Wno-packed"
 | 
			
		||||
    "-Wno-padded"
 | 
			
		||||
    "-Wno-sign-compare"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
"""GENERATED! DO NOT MANUALLY EDIT THIS FILE.
 | 
			
		||||
 | 
			
		||||
(1) Edit absl/copts/copts.py.
 | 
			
		||||
(2) Run `<path_to_absl>/copts/generate_copts.py`.
 | 
			
		||||
(2) Run `python <path_to_absl>/copts/generate_copts.py`.
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
GCC_EXCEPTIONS_FLAGS = [
 | 
			
		||||
| 
						 | 
				
			
			@ -49,6 +49,7 @@ LLVM_FLAGS = [
 | 
			
		|||
    "-Wno-double-promotion",
 | 
			
		||||
    "-Wno-comma",
 | 
			
		||||
    "-Wno-extra-semi",
 | 
			
		||||
    "-Wno-extra-semi-stmt",
 | 
			
		||||
    "-Wno-packed",
 | 
			
		||||
    "-Wno-padded",
 | 
			
		||||
    "-Wno-sign-compare",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,8 @@
 | 
			
		|||
This is the source of truth for Abseil compiler options.  To modify Abseil
 | 
			
		||||
compilation options:
 | 
			
		||||
 | 
			
		||||
  (1) Edit the appropriate list in this file.
 | 
			
		||||
  (1) Edit the appropriate list in this file based on the platform the flag is
 | 
			
		||||
      needed on.
 | 
			
		||||
  (2) Run `<path_to_absl>/copts/generate_copts.py`.
 | 
			
		||||
 | 
			
		||||
The generated copts are consumed by configure_copts.bzl and
 | 
			
		||||
| 
						 | 
				
			
			@ -11,7 +12,6 @@ AbseilConfigureCopts.cmake.
 | 
			
		|||
"""
 | 
			
		||||
 | 
			
		||||
import collections  # absl:google-only(used for internal flags)
 | 
			
		||||
 | 
			
		||||
COPT_VARS = {
 | 
			
		||||
    "GCC_FLAGS": [
 | 
			
		||||
        "-Wall",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1079,7 +1079,7 @@ void Mutex::TryRemove(PerThreadSynch *s) {
 | 
			
		|||
// if the wait extends past the absolute time specified, even if "s" is still
 | 
			
		||||
// on the mutex queue.  In this case, remove "s" from the queue and return
 | 
			
		||||
// true, otherwise return false.
 | 
			
		||||
void Mutex::Block(PerThreadSynch *s) {
 | 
			
		||||
ABSL_XRAY_LOG_ARGS(1) void Mutex::Block(PerThreadSynch *s) {
 | 
			
		||||
  while (s->state.load(std::memory_order_acquire) == PerThreadSynch::kQueued) {
 | 
			
		||||
    if (!DecrementSynchSem(this, s, s->waitp->timeout)) {
 | 
			
		||||
      // After a timeout, we go into a spin loop until we remove ourselves
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,216 +13,306 @@
 | 
			
		|||
# See the License for the specific language governing permissions and
 | 
			
		||||
# limitations under the License.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
list(APPEND TYPES_PUBLIC_HEADERS
 | 
			
		||||
  "any.h"
 | 
			
		||||
  "bad_any_cast.h"
 | 
			
		||||
  "bad_optional_access.h"
 | 
			
		||||
  "optional.h"
 | 
			
		||||
  "span.h"
 | 
			
		||||
  "variant.h"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# any library
 | 
			
		||||
absl_header_library(
 | 
			
		||||
  TARGET
 | 
			
		||||
    absl_any
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    absl::bad_any_cast
 | 
			
		||||
    absl::base
 | 
			
		||||
    absl::meta
 | 
			
		||||
    absl::utility
 | 
			
		||||
  PRIVATE_COMPILE_FLAGS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  EXPORT_NAME
 | 
			
		||||
absl_cc_library(
 | 
			
		||||
  NAME
 | 
			
		||||
    any
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# span library
 | 
			
		||||
absl_header_library(
 | 
			
		||||
  TARGET
 | 
			
		||||
    absl_span
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
  HDRS
 | 
			
		||||
    "any.h"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::bad_any_cast
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::core_headers
 | 
			
		||||
    absl::type_traits
 | 
			
		||||
    absl::utility
 | 
			
		||||
  EXPORT_NAME
 | 
			
		||||
    span
 | 
			
		||||
  PUBLIC
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# bad_any_cast library
 | 
			
		||||
list(APPEND BAD_ANY_CAST_SRC
 | 
			
		||||
  "bad_any_cast.cc"
 | 
			
		||||
  ${TYPES_PUBLIC_HEADERS}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_library(
 | 
			
		||||
  TARGET
 | 
			
		||||
    absl_bad_any_cast
 | 
			
		||||
  SOURCES
 | 
			
		||||
    ${BAD_ANY_CAST_SRC}
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
  EXPORT_NAME
 | 
			
		||||
absl_cc_library(
 | 
			
		||||
  NAME
 | 
			
		||||
    bad_any_cast
 | 
			
		||||
  HDRS
 | 
			
		||||
   "bad_any_cast.h"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::bad_any_cast_impl
 | 
			
		||||
    absl::config
 | 
			
		||||
  PUBLIC
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# optional library
 | 
			
		||||
list(APPEND OPTIONAL_SRC
 | 
			
		||||
  "optional.cc"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_library(
 | 
			
		||||
  TARGET
 | 
			
		||||
    absl_optional
 | 
			
		||||
  SOURCES
 | 
			
		||||
    ${OPTIONAL_SRC}
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    absl::bad_optional_access
 | 
			
		||||
absl_cc_library(
 | 
			
		||||
  NAME
 | 
			
		||||
    bad_any_cast_impl
 | 
			
		||||
  SRCS
 | 
			
		||||
   "bad_any_cast.h"
 | 
			
		||||
   "bad_any_cast.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::base
 | 
			
		||||
    absl::memory
 | 
			
		||||
    absl::meta
 | 
			
		||||
    absl::utility
 | 
			
		||||
  EXPORT_NAME
 | 
			
		||||
    optional
 | 
			
		||||
    absl::config
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
set(BAD_OPTIONAL_ACCESS_SRC "bad_optional_access.cc")
 | 
			
		||||
set(BAD_OPTIONAL_ACCESS_LIBRARIES absl::base)
 | 
			
		||||
 | 
			
		||||
absl_library(
 | 
			
		||||
  TARGET
 | 
			
		||||
    absl_bad_optional_access
 | 
			
		||||
  SOURCES
 | 
			
		||||
    ${BAD_OPTIONAL_ACCESS_SRC}
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    ${BAD_OPTIONAL_ACCESS_PUBLIC_LIBRARIES}
 | 
			
		||||
  EXPORT_NAME
 | 
			
		||||
    bad_optional_access
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# variant library
 | 
			
		||||
absl_library(
 | 
			
		||||
  TARGET
 | 
			
		||||
    absl_variant
 | 
			
		||||
  SOURCES
 | 
			
		||||
    "bad_variant_access.h" "bad_variant_access.cc" "variant.h" "internal/variant.h"
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    absl::base absl::meta absl::utility
 | 
			
		||||
  PRIVATE_COMPILE_FLAGS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  EXPORT_NAME
 | 
			
		||||
    variant
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
## TESTS
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# test any_test
 | 
			
		||||
set(ANY_TEST_SRC "any_test.cc")
 | 
			
		||||
set(ANY_TEST_PUBLIC_LIBRARIES absl::base absl_internal_throw_delegate absl::any absl::bad_any_cast absl::test_instance_tracker)
 | 
			
		||||
 | 
			
		||||
absl_test(
 | 
			
		||||
  TARGET
 | 
			
		||||
absl_cc_test(
 | 
			
		||||
  NAME
 | 
			
		||||
    any_test
 | 
			
		||||
  SOURCES
 | 
			
		||||
    ${ANY_TEST_SRC}
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    ${ANY_TEST_PUBLIC_LIBRARIES}
 | 
			
		||||
  PRIVATE_COMPILE_FLAGS
 | 
			
		||||
  SRCS
 | 
			
		||||
    "any_test.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::any
 | 
			
		||||
    absl::base
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::exception_testing
 | 
			
		||||
    absl::test_instance_tracker
 | 
			
		||||
    gmock_main
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# test any_test_noexceptions
 | 
			
		||||
absl_test(
 | 
			
		||||
  TARGET
 | 
			
		||||
absl_cc_test(
 | 
			
		||||
  NAME
 | 
			
		||||
    any_test_noexceptions
 | 
			
		||||
  SOURCES
 | 
			
		||||
    ${ANY_TEST_SRC}
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    ${ANY_TEST_PUBLIC_LIBRARIES}
 | 
			
		||||
  SRCS
 | 
			
		||||
    "any_test.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::any
 | 
			
		||||
    absl::base
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::exception_testing
 | 
			
		||||
    absl::test_instance_tracker
 | 
			
		||||
    gmock_main
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# test any_exception_safety_test
 | 
			
		||||
set(ANY_EXCEPTION_SAFETY_TEST_SRC "any_exception_safety_test.cc")
 | 
			
		||||
set(ANY_EXCEPTION_SAFETY_TEST_PUBLIC_LIBRARIES
 | 
			
		||||
  absl::any
 | 
			
		||||
  absl::base
 | 
			
		||||
  absl_internal_exception_safety_testing
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_test(
 | 
			
		||||
  TARGET
 | 
			
		||||
absl_cc_test(
 | 
			
		||||
  NAME
 | 
			
		||||
    any_exception_safety_test
 | 
			
		||||
  SOURCES
 | 
			
		||||
    ${ANY_EXCEPTION_SAFETY_TEST_SRC}
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    ${ANY_EXCEPTION_SAFETY_TEST_PUBLIC_LIBRARIES}
 | 
			
		||||
  PRIVATE_COMPILE_FLAGS
 | 
			
		||||
  SRCS
 | 
			
		||||
    "any_exception_safety_test.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::any
 | 
			
		||||
    absl::exception_safety_testing
 | 
			
		||||
    gmock_main
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_cc_library(
 | 
			
		||||
  NAME
 | 
			
		||||
    span
 | 
			
		||||
  HDRS
 | 
			
		||||
    "span.h"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::algorithm
 | 
			
		||||
    absl::core_headers
 | 
			
		||||
    absl::throw_delegate
 | 
			
		||||
    absl::type_traits
 | 
			
		||||
  PUBLIC
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# test span_test
 | 
			
		||||
set(SPAN_TEST_SRC "span_test.cc")
 | 
			
		||||
set(SPAN_TEST_PUBLIC_LIBRARIES absl::base absl::strings absl_internal_throw_delegate absl::span absl::test_instance_tracker)
 | 
			
		||||
 | 
			
		||||
absl_test(
 | 
			
		||||
  TARGET
 | 
			
		||||
absl_cc_test(
 | 
			
		||||
  NAME
 | 
			
		||||
    span_test
 | 
			
		||||
  SOURCES
 | 
			
		||||
    ${SPAN_TEST_SRC}
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    ${SPAN_TEST_PUBLIC_LIBRARIES}
 | 
			
		||||
  PRIVATE_COMPILE_FLAGS
 | 
			
		||||
  SRCS
 | 
			
		||||
    "span_test.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::span
 | 
			
		||||
    absl::base
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::core_headers
 | 
			
		||||
    absl::exception_testing
 | 
			
		||||
    absl::fixed_array
 | 
			
		||||
    absl::inlined_vector
 | 
			
		||||
    absl::hash_testing
 | 
			
		||||
    absl::strings
 | 
			
		||||
    gmock_main
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# test span_test_noexceptions
 | 
			
		||||
absl_test(
 | 
			
		||||
  TARGET
 | 
			
		||||
absl_cc_test(
 | 
			
		||||
  NAME
 | 
			
		||||
    span_test_noexceptions
 | 
			
		||||
  SOURCES
 | 
			
		||||
    ${SPAN_TEST_SRC}
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    ${SPAN_TEST_PUBLIC_LIBRARIES}
 | 
			
		||||
  SRCS
 | 
			
		||||
    "span_test.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::span
 | 
			
		||||
    absl::base
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::core_headers
 | 
			
		||||
    absl::exception_testing
 | 
			
		||||
    absl::fixed_array
 | 
			
		||||
    absl::inlined_vector
 | 
			
		||||
    absl::hash_testing
 | 
			
		||||
    absl::strings
 | 
			
		||||
    gmock_main
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# test optional_test
 | 
			
		||||
set(OPTIONAL_TEST_SRC "optional_test.cc")
 | 
			
		||||
set(OPTIONAL_TEST_PUBLIC_LIBRARIES absl::base absl_internal_throw_delegate absl::optional absl_bad_optional_access)
 | 
			
		||||
 | 
			
		||||
absl_test(
 | 
			
		||||
  TARGET
 | 
			
		||||
    optional_test
 | 
			
		||||
  SOURCES
 | 
			
		||||
    ${OPTIONAL_TEST_SRC}
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    ${OPTIONAL_TEST_PUBLIC_LIBRARIES}
 | 
			
		||||
absl_cc_library(
 | 
			
		||||
  NAME
 | 
			
		||||
    optional
 | 
			
		||||
  HDRS
 | 
			
		||||
    "optional.h"
 | 
			
		||||
  SRCS
 | 
			
		||||
    "optional.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::bad_optional_access
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::core_headers
 | 
			
		||||
    absl::memory
 | 
			
		||||
    absl::type_traits
 | 
			
		||||
    absl::utility
 | 
			
		||||
  PUBLIC
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# test optional_exception_safety_test
 | 
			
		||||
set(OPTIONAL_EXCEPTION_SAFETY_TEST_SRC "optional_exception_safety_test.cc")
 | 
			
		||||
set(OPTIONAL_EXCEPTION_SAFETY_TEST_PUBLIC_LIBRARIES
 | 
			
		||||
  absl::optional
 | 
			
		||||
  absl_internal_exception_safety_testing
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_test(
 | 
			
		||||
  TARGET
 | 
			
		||||
    optional_exception_safety_test
 | 
			
		||||
  SOURCES
 | 
			
		||||
    ${OPTIONAL_EXCEPTION_SAFETY_TEST_SRC}
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    ${OPTIONAL_EXCEPTION_SAFETY_TEST_PUBLIC_LIBRARIES}
 | 
			
		||||
  PRIVATE_COMPILE_FLAGS
 | 
			
		||||
absl_cc_library(
 | 
			
		||||
  NAME
 | 
			
		||||
    bad_optional_access
 | 
			
		||||
  HDRS
 | 
			
		||||
    "bad_optional_access.h"
 | 
			
		||||
  SRCS
 | 
			
		||||
    "bad_optional_access.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::base
 | 
			
		||||
    absl::config
 | 
			
		||||
  PUBLIC
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_cc_library(
 | 
			
		||||
  NAME
 | 
			
		||||
    bad_variant_access
 | 
			
		||||
  HDRS
 | 
			
		||||
    "bad_variant_access.h"
 | 
			
		||||
  SRCS
 | 
			
		||||
    "bad_variant_access.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::base
 | 
			
		||||
    absl::config
 | 
			
		||||
  PUBLIC
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_cc_test(
 | 
			
		||||
  NAME
 | 
			
		||||
    optional_test
 | 
			
		||||
  SRCS
 | 
			
		||||
    "optional_test.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::optional
 | 
			
		||||
    absl::base
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::type_traits
 | 
			
		||||
    absl::strings
 | 
			
		||||
    gmock_main
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_cc_test(
 | 
			
		||||
  NAME
 | 
			
		||||
    optional_exception_safety_test
 | 
			
		||||
  SRCS
 | 
			
		||||
    "optional_exception_safety_test.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::optional
 | 
			
		||||
    absl::exception_safety_testing
 | 
			
		||||
    gmock_main
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_cc_library(
 | 
			
		||||
  NAME
 | 
			
		||||
    variant
 | 
			
		||||
  HDRS
 | 
			
		||||
    "variant.h"
 | 
			
		||||
  SRCS
 | 
			
		||||
    "internal/variant.h"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::bad_variant_access
 | 
			
		||||
    absl::base_internal
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::core_headers
 | 
			
		||||
    absl::type_traits
 | 
			
		||||
    absl::utility
 | 
			
		||||
  PUBLIC
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_cc_test(
 | 
			
		||||
  NAME
 | 
			
		||||
    variant_test
 | 
			
		||||
  SRCS
 | 
			
		||||
    "variant_test.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::variant
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::core_headers
 | 
			
		||||
    absl::memory
 | 
			
		||||
    absl::type_traits
 | 
			
		||||
    absl::strings
 | 
			
		||||
    gmock_main
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# TODO(cohenjon,zhangxy) Figure out why this test is failing on gcc 4.8
 | 
			
		||||
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9)
 | 
			
		||||
absl_cc_test(
 | 
			
		||||
  NAME
 | 
			
		||||
    variant_exception_safety_test
 | 
			
		||||
  SRCS
 | 
			
		||||
    "variant_exception_safety_test.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG}
 | 
			
		||||
  LINKOPTS
 | 
			
		||||
    ${ABSL_EXCEPTIONS_FLAG_LINKOPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::variant
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::exception_safety_testing
 | 
			
		||||
    absl::memory
 | 
			
		||||
    gmock_main
 | 
			
		||||
)
 | 
			
		||||
endif()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,39 +14,31 @@
 | 
			
		|||
# limitations under the License.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
list(APPEND UTILITY_PUBLIC_HEADERS
 | 
			
		||||
  "utility.h"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_header_library(
 | 
			
		||||
  TARGET
 | 
			
		||||
    absl_utility
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    absl::base
 | 
			
		||||
  EXPORT_NAME
 | 
			
		||||
absl_cc_library(
 | 
			
		||||
  NAME
 | 
			
		||||
    utility
 | 
			
		||||
  HDRS
 | 
			
		||||
    "utility.h"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_DEFAULT_COPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::base_internal
 | 
			
		||||
    absl::config
 | 
			
		||||
    absl::type_traits
 | 
			
		||||
  PUBLIC
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
## TESTS
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# test utility_test
 | 
			
		||||
set(UTILITY_TEST_SRC "utility_test.cc")
 | 
			
		||||
set(UTILITY_TEST_PUBLIC_LIBRARIES
 | 
			
		||||
  absl::base
 | 
			
		||||
  absl::memory
 | 
			
		||||
  absl::strings
 | 
			
		||||
  absl::utility
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
absl_test(
 | 
			
		||||
  TARGET
 | 
			
		||||
absl_cc_test(
 | 
			
		||||
  NAME
 | 
			
		||||
    utility_test
 | 
			
		||||
  SOURCES
 | 
			
		||||
    ${UTILITY_TEST_SRC}
 | 
			
		||||
  PUBLIC_LIBRARIES
 | 
			
		||||
    ${UTILITY_TEST_PUBLIC_LIBRARIES}
 | 
			
		||||
  SRCS
 | 
			
		||||
    "utility_test.cc"
 | 
			
		||||
  COPTS
 | 
			
		||||
    ${ABSL_TEST_COPTS}
 | 
			
		||||
  DEPS
 | 
			
		||||
    absl::utility
 | 
			
		||||
    absl::core_headers
 | 
			
		||||
    absl::memory
 | 
			
		||||
    absl::strings
 | 
			
		||||
    gmock_main
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue