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 c1590447 Fix GNU g++ on MacOS compilation error (#499)
c1590447 is described below
commit c1590447153e27a71bfd26e408a2704281a9fb14
Author: Stephen Webb <[email protected]>
AuthorDate: Wed May 14 12:04:33 2025 +1000
Fix GNU g++ on MacOS compilation error (#499)
---
.github/workflows/log4cxx-macos.yml | 5 +++++
src/main/include/CMakeLists.txt | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/log4cxx-macos.yml
b/.github/workflows/log4cxx-macos.yml
index a08af12d..21186763 100644
--- a/.github/workflows/log4cxx-macos.yml
+++ b/.github/workflows/log4cxx-macos.yml
@@ -36,6 +36,11 @@ jobs:
cxx: clang++
odbc: ON
qt: OFF
+ - name: osx-g++
+ os: macos-latest
+ cxx: g++-14
+ odbc: OFF
+ qt: OFF
steps:
- uses: actions/checkout@v4
diff --git a/src/main/include/CMakeLists.txt b/src/main/include/CMakeLists.txt
index 26cb928d..57195f51 100644
--- a/src/main/include/CMakeLists.txt
+++ b/src/main/include/CMakeLists.txt
@@ -39,8 +39,10 @@ option(LOG4CXX_WCHAR_T "Enable wchar_t API methods" ON)
option(LOG4CXX_UNICHAR "Enable UniChar API methods" OFF)
set(INIT_IOS_BASE 0)
if(APPLE)
-option(LOG4CXX_CFSTRING "Enable CFString API methods, requires Mac OS/X
CoreFoundation" OFF)
-set(INIT_IOS_BASE 1)
+ option(LOG4CXX_CFSTRING "Enable CFString API methods, requires Mac OS/X
CoreFoundation" OFF)
+ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+ set(INIT_IOS_BASE 1)
+ endif()
endif()
set(CHAR_API 1)
foreach(varName WCHAR_T UNICHAR CFSTRING )