This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
The following commit(s) were added to refs/heads/master by this push:
new a204fc9a Compile and test code designated for the next ABI (#497)
a204fc9a is described below
commit a204fc9a95a3c8ba2126024c864537782d817aec
Author: Stephen Webb <[email protected]>
AuthorDate: Sun Apr 20 11:34:41 2025 +1000
Compile and test code designated for the next ABI (#497)
---
.github/workflows/log4cxx-ubuntu.yml | 5 +++++
CMakeLists.txt | 10 ++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/log4cxx-ubuntu.yml
b/.github/workflows/log4cxx-ubuntu.yml
index a07caadd..cd4b4863 100644
--- a/.github/workflows/log4cxx-ubuntu.yml
+++ b/.github/workflows/log4cxx-ubuntu.yml
@@ -38,6 +38,7 @@ jobs:
exitevents: OFF
fuzzers: OFF
logchar: utf-8
+ next_abi: OFF
- name: ubuntu22-clang
os: ubuntu-22.04
cxx: clang++
@@ -50,6 +51,7 @@ jobs:
exitevents: OFF
fuzzers: ON
logchar: utf-8
+ next_abi: OFF
- name: ubuntu24-gcc
os: ubuntu-24.04
cxx: g++
@@ -62,6 +64,7 @@ jobs:
exitevents: ON
fuzzers: OFF
logchar: utf-8
+ next_abi: ON
- name: ubuntu24-clang
os: ubuntu-24.04
cxx: clang++
@@ -74,6 +77,7 @@ jobs:
exitevents: OFF
fuzzers: ON
logchar: wchar_t
+ next_abi: OFF
steps:
- uses: actions/checkout@v4
@@ -113,6 +117,7 @@ jobs:
-DLOG4CXX_EVENTS_AT_EXIT=${{ matrix.exitevents }} \
-DBUILD_FUZZERS=${{ matrix.fuzzers }} \
-DLOG4CXX_CHAR=${{ matrix.logchar }} \
+ -DLOG4CXX_BUILD_NEXT_ABI=${{ matrix.next_abi }} \
..
cmake --build .
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1668927a..5446b2c4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,10 +33,12 @@ set(LOG4CXX_NS "log4cxx" CACHE STRING "Root namespace name")
# Note that the lib version is different from the SOVERSION
# The lib version is the version of log4cxx, the SOVERSION is the ABI version
# See also: https://cmake.org/pipermail/cmake/2012-September/051904.html
-set(current_log4cxx_ABI_VER 15)
-set(next_log4cxx_ABI_VER 16)
-set(log4cxx_ABI_VER "${current_log4cxx_ABI_VER}" CACHE STRING "The DSO library
version")
-set_property(CACHE log4cxx_ABI_VER PROPERTY STRINGS
"${current_log4cxx_ABI_VER}" "${next_log4cxx_ABI_VER}")
+option(LOG4CXX_BUILD_NEXT_ABI "Build code designated for the next ABI version"
OFF)
+if(LOG4CXX_BUILD_NEXT_ABI)
+ set(log4cxx_ABI_VER 16)
+else()
+ set(log4cxx_ABI_VER 15)
+endif()
set(LIBLOG4CXX_LIB_VERSION
${log4cxx_ABI_VER}.${log4cxx_VERSION_MINOR}.${log4cxx_VERSION_PATCH})
set(LIBLOG4CXX_LIB_SOVERSION ${log4cxx_ABI_VER})
# Set the 'release' version. This is the human-readable version