Skip to content

Commit a204fc9

Browse files
authored
Compile and test code designated for the next ABI (#497)
1 parent 9659f08 commit a204fc9

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/log4cxx-ubuntu.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
exitevents: OFF
3939
fuzzers: OFF
4040
logchar: utf-8
41+
next_abi: OFF
4142
- name: ubuntu22-clang
4243
os: ubuntu-22.04
4344
cxx: clang++
@@ -50,6 +51,7 @@ jobs:
5051
exitevents: OFF
5152
fuzzers: ON
5253
logchar: utf-8
54+
next_abi: OFF
5355
- name: ubuntu24-gcc
5456
os: ubuntu-24.04
5557
cxx: g++
@@ -62,6 +64,7 @@ jobs:
6264
exitevents: ON
6365
fuzzers: OFF
6466
logchar: utf-8
67+
next_abi: ON
6568
- name: ubuntu24-clang
6669
os: ubuntu-24.04
6770
cxx: clang++
@@ -74,6 +77,7 @@ jobs:
7477
exitevents: OFF
7578
fuzzers: ON
7679
logchar: wchar_t
80+
next_abi: OFF
7781

7882
steps:
7983
- uses: actions/checkout@v4
@@ -113,6 +117,7 @@ jobs:
113117
-DLOG4CXX_EVENTS_AT_EXIT=${{ matrix.exitevents }} \
114118
-DBUILD_FUZZERS=${{ matrix.fuzzers }} \
115119
-DLOG4CXX_CHAR=${{ matrix.logchar }} \
120+
-DLOG4CXX_BUILD_NEXT_ABI=${{ matrix.next_abi }} \
116121
..
117122
cmake --build .
118123

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ set(LOG4CXX_NS "log4cxx" CACHE STRING "Root namespace name")
3333
# Note that the lib version is different from the SOVERSION
3434
# The lib version is the version of log4cxx, the SOVERSION is the ABI version
3535
# See also: https://cmake.org/pipermail/cmake/2012-September/051904.html
36-
set(current_log4cxx_ABI_VER 15)
37-
set(next_log4cxx_ABI_VER 16)
38-
set(log4cxx_ABI_VER "${current_log4cxx_ABI_VER}" CACHE STRING "The DSO library version")
39-
set_property(CACHE log4cxx_ABI_VER PROPERTY STRINGS "${current_log4cxx_ABI_VER}" "${next_log4cxx_ABI_VER}")
36+
option(LOG4CXX_BUILD_NEXT_ABI "Build code designated for the next ABI version" OFF)
37+
if(LOG4CXX_BUILD_NEXT_ABI)
38+
set(log4cxx_ABI_VER 16)
39+
else()
40+
set(log4cxx_ABI_VER 15)
41+
endif()
4042
set(LIBLOG4CXX_LIB_VERSION ${log4cxx_ABI_VER}.${log4cxx_VERSION_MINOR}.${log4cxx_VERSION_PATCH})
4143
set(LIBLOG4CXX_LIB_SOVERSION ${log4cxx_ABI_VER})
4244
# Set the 'release' version. This is the human-readable version

0 commit comments

Comments
 (0)