diff options
Diffstat (limited to 'CMake/AbseilDll.cmake')
-rw-r--r-- | CMake/AbseilDll.cmake | 108 |
1 files changed, 68 insertions, 40 deletions
diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake index c4a41e6d..47f3beeb 100644 --- a/CMake/AbseilDll.cmake +++ b/CMake/AbseilDll.cmake @@ -26,8 +26,9 @@ set(ABSL_INTERNAL_DLL_FILES "base/internal/low_level_alloc.cc" "base/internal/low_level_alloc.h" "base/internal/low_level_scheduling.h" + "base/internal/nullability_impl.h" "base/internal/per_thread_tls.h" - "base/internal/prefetch.h" + "base/prefetch.h" "base/internal/pretty_function.h" "base/internal/raw_logging.cc" "base/internal/raw_logging.h" @@ -42,7 +43,6 @@ set(ABSL_INTERNAL_DLL_FILES "base/internal/spinlock_wait.h" "base/internal/sysinfo.cc" "base/internal/sysinfo.h" - "base/internal/thread_annotations.h" "base/internal/thread_identity.cc" "base/internal/thread_identity.h" "base/internal/throw_delegate.cc" @@ -55,6 +55,8 @@ set(ABSL_INTERNAL_DLL_FILES "base/log_severity.cc" "base/log_severity.h" "base/macros.h" + "base/no_destructor.h" + "base/nullability.h" "base/optimization.h" "base/options.h" "base/policy_checks.h" @@ -74,7 +76,6 @@ set(ABSL_INTERNAL_DLL_FILES "container/internal/common_policy_traits.h" "container/internal/compressed_tuple.h" "container/internal/container_memory.h" - "container/internal/counting_allocator.h" "container/internal/hash_function_defaults.h" "container/internal/hash_policy_traits.h" "container/internal/hashtable_debug.h" @@ -106,7 +107,7 @@ set(ABSL_INTERNAL_DLL_FILES "crc/internal/crc_x86_arm_combined.cc" "crc/internal/crc_memcpy_fallback.cc" "crc/internal/crc_memcpy.h" - "crc/internal/crc_memcpy_x86_64.cc" + "crc/internal/crc_memcpy_x86_arm_combined.cc" "crc/internal/crc_non_temporal_memcpy.cc" "crc/internal/crc_x86_arm_combined.cc" "crc/internal/non_temporal_arm_intrinsics.h" @@ -138,6 +139,7 @@ set(ABSL_INTERNAL_DLL_FILES "functional/function_ref.h" "functional/internal/any_invocable.h" "functional/internal/function_ref.h" + "functional/overload.h" "hash/hash.h" "hash/internal/city.h" "hash/internal/city.cc" @@ -148,6 +150,7 @@ set(ABSL_INTERNAL_DLL_FILES "hash/internal/low_level_hash.cc" "log/absl_check.h" "log/absl_log.h" + "log/absl_vlog_is_on.h" "log/check.h" "log/die_if_null.cc" "log/die_if_null.h" @@ -160,6 +163,8 @@ set(ABSL_INTERNAL_DLL_FILES "log/internal/conditions.cc" "log/internal/conditions.h" "log/internal/config.h" + "log/internal/fnmatch.h" + "log/internal/fnmatch.cc" "log/internal/globals.cc" "log/internal/globals.h" "log/internal/log_format.cc" @@ -176,6 +181,8 @@ set(ABSL_INTERNAL_DLL_FILES "log/internal/proto.cc" "log/internal/strip.h" "log/internal/structured.h" + "log/internal/vlog_config.cc" + "log/internal/vlog_config.h" "log/internal/voidify.h" "log/initialize.cc" "log/initialize.h" @@ -187,6 +194,7 @@ set(ABSL_INTERNAL_DLL_FILES "log/log_sink_registry.h" "log/log_streamer.h" "log/structured.h" + "log/vlog_is_on.h" "memory/memory.h" "meta/type_traits.h" "numeric/bits.h" @@ -247,6 +255,7 @@ set(ABSL_INTERNAL_DLL_FILES "random/uniform_real_distribution.h" "random/zipf_distribution.h" "status/internal/status_internal.h" + "status/internal/status_internal.cc" "status/internal/statusor_internal.h" "status/status.h" "status/status.cc" @@ -258,6 +267,7 @@ set(ABSL_INTERNAL_DLL_FILES "strings/ascii.h" "strings/charconv.cc" "strings/charconv.h" + "strings/charset.h" "strings/cord.cc" "strings/cord.h" "strings/cord_analysis.cc" @@ -284,9 +294,6 @@ set(ABSL_INTERNAL_DLL_FILES "strings/internal/cord_rep_consume.h" "strings/internal/cord_rep_consume.cc" "strings/internal/cord_rep_flat.h" - "strings/internal/cord_rep_ring.cc" - "strings/internal/cord_rep_ring.h" - "strings/internal/cord_rep_ring_reader.h" "strings/internal/cordz_functions.cc" "strings/internal/cordz_functions.h" "strings/internal/cordz_handle.cc" @@ -305,6 +312,8 @@ set(ABSL_INTERNAL_DLL_FILES "strings/internal/stringify_sink.h" "strings/internal/stringify_sink.cc" "strings/internal/has_absl_stringify.h" + "strings/has_absl_stringify.h" + "strings/has_ostream_operator.h" "strings/match.cc" "strings/match.h" "strings/numbers.cc" @@ -322,7 +331,6 @@ set(ABSL_INTERNAL_DLL_FILES "strings/strip.h" "strings/substitute.cc" "strings/substitute.h" - "strings/internal/char_map.h" "strings/internal/escaping.h" "strings/internal/escaping.cc" "strings/internal/memutil.cc" @@ -361,14 +369,26 @@ set(ABSL_INTERNAL_DLL_FILES "synchronization/internal/create_thread_identity.cc" "synchronization/internal/create_thread_identity.h" "synchronization/internal/futex.h" + "synchronization/internal/futex_waiter.h" + "synchronization/internal/futex_waiter.cc" "synchronization/internal/graphcycles.cc" "synchronization/internal/graphcycles.h" "synchronization/internal/kernel_timeout.h" + "synchronization/internal/kernel_timeout.cc" "synchronization/internal/per_thread_sem.cc" "synchronization/internal/per_thread_sem.h" + "synchronization/internal/pthread_waiter.h" + "synchronization/internal/pthread_waiter.cc" + "synchronization/internal/sem_waiter.h" + "synchronization/internal/sem_waiter.cc" + "synchronization/internal/stdcpp_waiter.h" + "synchronization/internal/stdcpp_waiter.cc" "synchronization/internal/thread_pool.h" - "synchronization/internal/waiter.cc" "synchronization/internal/waiter.h" + "synchronization/internal/waiter_base.h" + "synchronization/internal/waiter_base.cc" + "synchronization/internal/win32_waiter.h" + "synchronization/internal/win32_waiter.cc" "time/civil_time.cc" "time/civil_time.h" "time/clock.cc" @@ -406,17 +426,13 @@ set(ABSL_INTERNAL_DLL_FILES "types/bad_variant_access.cc" "types/bad_variant_access.h" "types/compare.h" - "types/internal/conformance_aliases.h" - "types/internal/conformance_archetype.h" - "types/internal/conformance_profile.h" - "types/internal/parentheses.h" - "types/internal/transform_args.h" "types/internal/variant.h" "types/optional.h" "types/internal/optional.h" "types/span.h" "types/internal/span.h" "types/variant.h" + "utility/internal/if_constexpr.h" "utility/utility.h" "debugging/leak_check.cc" ) @@ -448,8 +464,14 @@ set(ABSL_INTERNAL_DLL_TARGETS "container_common" "container_memory" "cord" + "cord_internal" + "cordz_functions" + "cordz_handle" + "cordz_info" + "cordz_sample_token" "core_headers" "counting_allocator" + "crc_cord_state" "crc_cpu_detect" "crc_internal" "crc32c" @@ -504,6 +526,7 @@ set(ABSL_INTERNAL_DLL_TARGETS "log_internal_structured" "log_severity" "log_structured" + "low_level_hash" "malloc_internal" "memory" "meta" @@ -555,8 +578,10 @@ set(ABSL_INTERNAL_DLL_TARGETS "stack_consumption" "stacktrace" "status" + "statusor" "str_format" "str_format_internal" + "strerror" "strings" "strings_internal" "symbolize" @@ -575,6 +600,10 @@ set(ABSL_INTERNAL_TEST_DLL_FILES "hash/hash_testing.h" "log/scoped_mock_log.cc" "log/scoped_mock_log.h" + "random/internal/chi_square.cc" + "random/internal/chi_square.h" + "random/internal/distribution_test_util.cc" + "random/internal/distribution_test_util.h" "random/internal/mock_helpers.h" "random/internal/mock_overload_set.h" "random/mocking_bit_gen.h" @@ -588,34 +617,42 @@ set(ABSL_INTERNAL_TEST_DLL_TARGETS "cordz_test_helpers" "hash_testing" "random_mocking_bit_gen" + "random_internal_distribution_test_util" "random_internal_mock_overload_set" "scoped_mock_log" ) -function(_absl_target_compile_features_if_available TARGET TYPE FEATURE) - if(FEATURE IN_LIST CMAKE_CXX_COMPILE_FEATURES) - target_compile_features(${TARGET} ${TYPE} ${FEATURE}) - else() - message(WARNING "Feature ${FEATURE} is unknown for the CXX compiler") - endif() -endfunction() - include(CheckCXXSourceCompiles) check_cxx_source_compiles( [==[ #ifdef _MSC_VER -# if _MSVC_LANG < 201700L +# if _MSVC_LANG < 201703L # error "The compiler defaults or is configured for C++ < 17" # endif -#elif __cplusplus < 201700L +#elif __cplusplus < 201703L # error "The compiler defaults or is configured for C++ < 17" #endif int main() { return 0; } ]==] ABSL_INTERNAL_AT_LEAST_CXX17) -if(ABSL_INTERNAL_AT_LEAST_CXX17) +check_cxx_source_compiles( + [==[ +#ifdef _MSC_VER +# if _MSVC_LANG < 202002L +# error "The compiler defaults or is configured for C++ < 20" +# endif +#elif __cplusplus < 202002L +# error "The compiler defaults or is configured for C++ < 20" +#endif +int main() { return 0; } +]==] + ABSL_INTERNAL_AT_LEAST_CXX20) + +if(ABSL_INTERNAL_AT_LEAST_CXX20) + set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_20) +elseif(ABSL_INTERNAL_AT_LEAST_CXX17) set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_17) else() set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_14) @@ -766,7 +803,7 @@ Name: ${_dll}\n\ Description: Abseil DLL library\n\ URL: https://abseil.io/\n\ Version: ${absl_VERSION}\n\ -Libs: -L\${libdir} ${PC_LINKOPTS} $<$<NOT:$<BOOL:${ABSL_CC_LIB_IS_INTERFACE}>>:-l${_dll}>\n\ +Libs: -L\${libdir} $<$<NOT:$<BOOL:${ABSL_CC_LIB_IS_INTERFACE}>>:-l${_dll}> ${PC_LINKOPTS}\n\ Cflags: -I\${includedir}${PC_CFLAGS}\n") INSTALL(FILES "${CMAKE_BINARY_DIR}/lib/pkgconfig/${_dll}.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") @@ -785,20 +822,9 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n") if(ABSL_PROPAGATE_CXX_STD) # Abseil libraries require C++14 as the current minimum standard. When - # compiled with C++17 (either because it is the compiler's default or - # explicitly requested), then Abseil requires C++17. - _absl_target_compile_features_if_available(${_NAME} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE}) - else() - # Note: This is legacy (before CMake 3.8) behavior. Setting the - # target-level CXX_STANDARD property to ABSL_CXX_STANDARD (which is - # initialized by CMAKE_CXX_STANDARD) should have no real effect, since - # that is the default value anyway. - # - # CXX_STANDARD_REQUIRED does guard against the top-level CMake project - # not having enabled CMAKE_CXX_STANDARD_REQUIRED (which prevents - # "decaying" to an older standard if the requested one isn't available). - set_property(TARGET ${_NAME} PROPERTY CXX_STANDARD ${ABSL_CXX_STANDARD}) - set_property(TARGET ${_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) + # compiled with a higher minimum (either because it is the compiler's + # default or explicitly requested), then Abseil requires that standard. + target_compile_features(${_dll} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE}) endif() install(TARGETS ${_dll} EXPORT ${PROJECT_NAME}Targets @@ -806,4 +832,6 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n") LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) + + add_library(absl::${_dll} ALIAS ${_dll}) endfunction() |