You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by sw...@apache.org on 2024/01/07 06:20:37 UTC
(logging-log4cxx) branch simplify_build created (now 01e8913d)
This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a change to branch simplify_build
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
at 01e8913d Reduce the complexity of internal character representation configuration
This branch includes the following new commits:
new 01e8913d Reduce the complexity of internal character representation configuration
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(logging-log4cxx) 01/01: Reduce the complexity of internal character representation configuration
Posted by sw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a commit to branch simplify_build
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 01e8913df78963618662aa999f41e0802f01c596
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Sun Jan 7 17:20:07 2024 +1100
Reduce the complexity of internal character representation configuration
---
src/main/include/CMakeLists.txt | 32 +++++++++++---------------------
1 file changed, 11 insertions(+), 21 deletions(-)
diff --git a/src/main/include/CMakeLists.txt b/src/main/include/CMakeLists.txt
index 90e8a316..ac7bff2d 100644
--- a/src/main/include/CMakeLists.txt
+++ b/src/main/include/CMakeLists.txt
@@ -17,28 +17,10 @@
set(GENERATED_HEADERS)
-# Configure
-if(WIN32)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/version_info.h.in
- ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/version_info.h
- @ONLY
- )
- list(APPEND GENERATED_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/version_info.h)
- set(LOG4CXX_CHAR "utf-8" CACHE STRING "Internal character representation, choice of utf-8, wchar_t(default), unichar")
- set_property(CACHE LOG4CXX_CHAR PROPERTY STRINGS "utf-8" "wchar_t" "unichar")
- set(LOGCHAR_IS_UNICHAR 0)
- set(LOGCHAR_IS_WCHAR 1)
- set(LOGCHAR_IS_UTF8 0)
-else()
- set(LOG4CXX_CHAR "utf-8" CACHE STRING "Internal character representation, choice of utf-8 (default), wchar_t, unichar")
- set_property(CACHE LOG4CXX_CHAR PROPERTY STRINGS "utf-8" "wchar_t" "unichar")
- set(LOGCHAR_IS_UNICHAR 0)
- set(LOGCHAR_IS_WCHAR 0)
- set(LOGCHAR_IS_UTF8 1)
-endif()
-
# Configure log4cxx.h
+set(LOG4CXX_CHAR "utf-8" CACHE STRING "Internal character representation, choice of utf-8, wchar_t, unichar")
+set_property(CACHE LOG4CXX_CHAR PROPERTY STRINGS "utf-8" "wchar_t" "unichar")
if(${LOG4CXX_CHAR} STREQUAL "unichar")
set(LOGCHAR_IS_UNICHAR 1)
set(LOGCHAR_IS_WCHAR 0)
@@ -47,7 +29,7 @@ elseif(${LOG4CXX_CHAR} STREQUAL "wchar_t")
set(LOGCHAR_IS_WCHAR 1)
set(LOGCHAR_IS_UNICHAR 0)
set(LOGCHAR_IS_UTF8 0)
-elseif(${LOG4CXX_CHAR} STREQUAL "utf-8")
+else()
set(LOGCHAR_IS_UNICHAR 0)
set(LOGCHAR_IS_WCHAR 0)
set(LOGCHAR_IS_UTF8 1)
@@ -204,6 +186,14 @@ configure_file(${LOG4CXX_SOURCE_DIR}/src/cmake/boost-fallback/boost-std-configur
)
list(APPEND GENERATED_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/private/boost-std-configuration.h)
+if(WIN32)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/version_info.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/version_info.h
+ @ONLY
+ )
+ list(APPEND GENERATED_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/version_info.h)
+endif()
+
# A target for the convenience of working with headers in the IDE
file(GENERATE
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/empty-lib-stub.cpp