[abseil] Add feature "test-helpers" (#45458)

This commit is contained in:
Eric Kilmer 2025-05-15 18:57:56 -04:00 committed by GitHub
parent d7ce8723ba
commit 04f5ef77a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 30 additions and 1 deletions

View File

@ -19,6 +19,11 @@ if("cxx17" IN_LIST FEATURES)
set(ABSL_USE_CXX17_OPTION "-DCMAKE_CXX_STANDARD=17")
endif()
set(ABSL_TEST_HELPERS_OPTIONS "")
if("test-helpers" IN_LIST FEATURES)
set(ABSL_TEST_HELPERS_OPTIONS "-DABSL_BUILD_TEST_HELPERS=ON" "-DABSL_USE_EXTERNAL_GOOGLETEST=ON" "-DABSL_FIND_GOOGLETEST=ON")
endif()
set(ABSL_STATIC_RUNTIME_OPTION "")
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static")
set(ABSL_STATIC_RUNTIME_OPTION "-DABSL_MSVC_STATIC_RUNTIME=ON")
@ -30,6 +35,7 @@ vcpkg_cmake_configure(
OPTIONS
-DABSL_PROPAGATE_CXX_STD=ON
${ABSL_USE_CXX17_OPTION}
${ABSL_TEST_HELPERS_OPTIONS}
${ABSL_STATIC_RUNTIME_OPTION}
)

View File

@ -1,6 +1,7 @@
{
"name": "abseil",
"version": "20250127.1",
"port-version": 1,
"description": [
"Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.",
"In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.",
@ -21,6 +22,23 @@
"features": {
"cxx17": {
"description": "Enable compiler C++17."
},
"test-helpers": {
"description": "Build Abseil's test helpers",
"dependencies": [
{
"name": "abseil",
"features": [
"cxx17"
]
},
{
"name": "gtest",
"features": [
"cxx17"
]
}
]
}
}
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6bb28e97cced88426e3126a47e247ed65608cc86",
"version": "20250127.1",
"port-version": 1
},
{
"git-tree": "0230366a6b5339adce4a78c24a6177a1165e16d2",
"version": "20250127.1",

View File

@ -18,7 +18,7 @@
},
"abseil": {
"baseline": "20250127.1",
"port-version": 0
"port-version": 1
},
"absent": {
"baseline": "0.3.1",