Skip to content

Commit 273292d

Browse files
authored
Apply LTS transformations for 20220623 LTS branch (#1202)
1 parent 4dc63ba commit 273292d

File tree

6 files changed

+12
-22
lines changed

6 files changed

+12
-22
lines changed

CMake/AbseilHelpers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
281281
if(ABSL_ENABLE_INSTALL)
282282
set_target_properties(${_NAME} PROPERTIES
283283
OUTPUT_NAME "absl_${_NAME}"
284-
SOVERSION 0
284+
SOVERSION "2206.0.0"
285285
)
286286
endif()
287287
else()

CMakeLists.txt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if (POLICY CMP0091)
4646
cmake_policy(SET CMP0091 NEW)
4747
endif (POLICY CMP0091)
4848

49-
project(absl LANGUAGES CXX)
49+
project(absl LANGUAGES CXX VERSION 20220623)
5050
include(CTest)
5151

5252
# Output directory is correct by default for most build setups. However, when
@@ -172,17 +172,7 @@ endif()
172172
add_subdirectory(absl)
173173

174174
if(ABSL_ENABLE_INSTALL)
175-
# absl:lts-remove-begin(system installation is supported for LTS releases)
176-
# We don't support system-wide installation
177-
list(APPEND SYSTEM_INSTALL_DIRS "/usr/local" "/usr" "/opt/" "/opt/local" "c:/Program Files/${PROJECT_NAME}")
178-
if(NOT DEFINED CMAKE_INSTALL_PREFIX OR CMAKE_INSTALL_PREFIX IN_LIST SYSTEM_INSTALL_DIRS)
179-
message(WARNING "\
180-
The default and system-level install directories are unsupported except in LTS \
181-
releases of Abseil. Please set CMAKE_INSTALL_PREFIX to install Abseil in your \
182-
source or build tree directly.\
183-
")
184-
endif()
185-
# absl:lts-remove-end
175+
186176

187177
# install as a subdirectory only
188178
install(EXPORT ${PROJECT_NAME}Targets

WORKSPACE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2020

2121
# GoogleTest/GoogleMock framework. Used by most unit-tests.
2222
http_archive(
23-
name = "com_google_googletest", # 2022-06-16T20:18:32Z
24-
sha256 = "a1d3123179024258f9c399d45da3e0b09c4aaf8d2c041466ce5b4793a8929f23",
25-
strip_prefix = "googletest-86add13493e5c881d7e4ba77fb91c1f57752b3a4",
23+
name = "com_google_googletest",
24+
sha256 = "ce7366fe57eb49928311189cb0e40e0a8bf3d3682fca89af30d884c25e983786",
25+
strip_prefix = "googletest-release-1.12.0",
2626
# Keep this URL in sync with ABSL_GOOGLETEST_COMMIT in ci/cmake_common.sh.
27-
urls = ["https://github.com/google/googletest/archive/86add13493e5c881d7e4ba77fb91c1f57752b3a4.zip"],
27+
urls = ["https://github.com/google/googletest/archive/refs/tags/release-1.12.0.zip"],
2828
)
2929

3030
# RE2 (the regular expression library used by GoogleTest)

absl/base/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@
111111
//
112112
// LTS releases can be obtained from
113113
// https://github.com/abseil/abseil-cpp/releases.
114-
#undef ABSL_LTS_RELEASE_VERSION
115-
#undef ABSL_LTS_RELEASE_PATCH_LEVEL
114+
#define ABSL_LTS_RELEASE_VERSION 20220623
115+
#define ABSL_LTS_RELEASE_PATCH_LEVEL 0
116116

117117
// Helper macro to convert a CPP variable to a string literal.
118118
#define ABSL_INTERNAL_DO_TOKEN_STR(x) #x

absl/base/options.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@
205205
// be changed to a new, unique identifier name. In particular "head" is not
206206
// allowed.
207207

208-
#define ABSL_OPTION_USE_INLINE_NAMESPACE 0
209-
#define ABSL_OPTION_INLINE_NAMESPACE_NAME head
208+
#define ABSL_OPTION_USE_INLINE_NAMESPACE 1
209+
#define ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20220623
210210

211211
// ABSL_OPTION_HARDENED
212212
//

ci/cmake_common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# The commit of GoogleTest to be used in the CMake tests in this directory.
1616
# Keep this in sync with the commit in the WORKSPACE file.
17-
readonly ABSL_GOOGLETEST_COMMIT="86add13493e5c881d7e4ba77fb91c1f57752b3a4"
17+
readonly ABSL_GOOGLETEST_COMMIT="15460959cbbfa20e66ef0b5ab497367e47fc0a04" # release-1.12.0
1818

1919
# Avoid depending on GitHub by looking for a cached copy of the commit first.
2020
if [[ -r "${KOKORO_GFILE_DIR:-}/distdir/${ABSL_GOOGLETEST_COMMIT}.zip" ]]; then

0 commit comments

Comments
 (0)