You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ts...@apache.org on 2020/02/09 20:19:40 UTC
[logging-log4cxx] branch ghpr_14_replace-ant-build-with-cmake
created (now e2c3533)
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a change to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git.
at e2c3533 Make the file render properly.
This branch includes the following new commits:
new a853310 Add support for building and testing with cmake
new 774ea16 Add support for building and testing with cmake
new b472300 Simplify integration into vcpkg
new e3000f6 Fix issues building on Linux
new 80a9fdb Disable building tests by default to conform with vcpkg guidelines
new d919ea1 Provide find modules for APR and APR-Util. Add the version resource to log4cxx.dll
new c244c28 Build examples when building tests
new e64b7cf Use cmake from maven to build and only use ant for site deployment and release
new 5b5ec13 Set release date to today.
new a71f936 Set the letter case of find modules to that required by case sensitive filesystems
new e5f8af1 Set the letter case of find modules to that required by case sensitive filesystems
new 704a80f Merge branch 'master' of https://github.com/apache/logging-log4cxx
new 6c1e0b6 Set the letter case of find modules to that required by case sensitive filesystems
new 472d97b Set the letter case of find modules to that required by case sensitive filesystems
new 5b81898 Set the letter case of find modules to that required by case sensitive filesystems
new 0504bc5 Merge branch 'master' of https://github.com/stephen-webb/logging-log4cxx
new 4ffba69 Merge https://github.com/apache/logging-log4cxx
new c3146a5 Add JSON appender and test
new 73f7333 Add JSON appender and test
new 426660e Merge https://github.com/apache/logging-log4cxx into replace-ant-build-with-cmake
new f3edfc4 Merge branch 'master' of https://github.com/stephen-webb/logging-log4cxx
new 48c597b Fix some test case failures
new 08d6176 Fix some test case failures
new dc7dc14 Remove unused files
new b3bec51 Remove unused files
new 7995db2 Merge branch 'replace-ant-build-with-cmake' of https://github.com/stephen-webb/logging-log4cxx into replace-ant-build-with-cmake
new 8dc8120 Fix some test case failures
new 4745721 Use automatic checks instead of options for log4cxx_private.h configuration
new c4f1b3d Provide install directory variables as defined by the GNU Coding Standards
new 6862c5e Use semantic versioning symbolic links in the installed target
new f133149 Install a pkgconfig file on unix systems
new d08e392 Fix failing defaultinittestcase
new 06875bd Revert "Fix failing defaultinittestcase"
new b9d9b0e Fix failing defaultinittestcase
new cd4a455 Only include smtpappendertestcase when libesmtp is available
new d5b5c38 Run autoconf during packaging if the OS is unix
new e0b4e4d Remove ant build references from build instructions. Add instructions for building from source on Windows
new ac90504 Change to cmake-maven-plugin that works on Windows
new 6ae3567 Fix typo in instructions for building from source on Windows
new d0c6cae Allow maven to be used with generators that need to be told which configuration to test
new b971dd0 Make socketservertestcase work independently of ant build
new a261ca7 Remove cpptasks as a dependency
new 84d3b60 Add platform specific instructions for cmake install
new 178598b Allow tests on Windows to be run from ctest
new 2027010 Merge branch 'replace-ant-build-with-cmake' of https://github.com/stephen-webb/logging-log4cxx into replace-ant-build-with-cmake
new c8eb659 Halt with an error if either APR or APR-Util cannot be found
new c36fea0 Make the file render properly.
new bb9ab5f Enhance support for paths with spaces by simply using a different divider character.
new e2c3533 Make the file render properly.
The 49 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] 29/49: Provide install directory variables as
defined by the GNU Coding Standards
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit c4f1b3d34d84d858081e6c7b154df8ec1dfddf02
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Sat Feb 1 13:58:03 2020 +1100
Provide install directory variables as defined by the GNU Coding Standards
---
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 91cfb74..b37e6e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,7 @@ find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1 aprutil-1)
add_subdirectory(src)
## Installing
+include(GNUInstallDirs)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/src/main/include/log4cxx
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
[logging-log4cxx] 41/49: Make socketservertestcase work
independently of ant build
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit b971dd0bba2c548539aefb60ca6b1ff0e2bbf10e
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Sun Feb 9 09:52:25 2020 +1100
Make socketservertestcase work independently of ant build
---
build.xml | 45 -------------
src/test/CMakeLists.txt | 6 +-
src/test/cpp/CMakeLists.txt | 13 +++-
src/test/cpp/net/CMakeLists.txt | 6 +-
src/test/cpp/net/socketserverstarter.cpp | 108 ++++++++++++++++++++++++++++++
src/test/cpp/net/socketservertestcase.cpp | 3 +-
src/test/java/CMakeLists.txt | 18 +++++
7 files changed, 147 insertions(+), 52 deletions(-)
diff --git a/build.xml b/build.xml
index 8c7fed7..6e1a811 100644
--- a/build.xml
+++ b/build.xml
@@ -229,51 +229,6 @@
</delete>
</target>
- <target name="run-socketserver"
- depends="clean-output"
- description="Runs SocketServer test">
- <property environment="env" />
- <mkdir dir="${tests.output.dir}" />
- <delete>
- <fileset dir="${tests.output.dir}"
- includes="*"
- />
- </delete>
- <mkdir dir="target/test-classes" />
- <javac srcdir="src/test/java"
- includes="org/apache/log4j/net/ShortSocketServer.java"
- destdir="target/test-classes"
- classpath="${log4j.jar}"
- />
- <parallel>
- <java classname="org.apache.log4j.net.ShortSocketServer"
- fork="yes" dir="src/test/resources"
- classpath="target/test-classes:${log4j.jar}">
- <arg value="8" />
- <arg value="input/socketServer" />
- </java>
- <sequential>
- <sleep seconds="2" />
- <exec executable="${testsuite.exe}"
- dir="${tests.resources.dir}"
- failonerror="true">
- <arg value="-v" />
- <arg value="socketservertestcase" />
-
- <env key="LD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
- />
- <env key="DYLD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
- />
- <env key="Path"
- value="${log4cxx.lib.dir};${env.Path}"
- />
- </exec>
- </sequential>
- </parallel>
- </target>
-
<target name="apidocs"
description="Build log4cxx manual">
<copy file="${base.dir}/src/site/doxy/Doxyfile.in"
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
index da8ed95..42ff357 100644
--- a/src/test/CMakeLists.txt
+++ b/src/test/CMakeLists.txt
@@ -1 +1,5 @@
-add_subdirectory(cpp)
\ No newline at end of file
+find_package(Java COMPONENTS Development)
+if(Java_Development_FOUND)
+ add_subdirectory(java)
+endif(Java_Development_FOUND)
+add_subdirectory(cpp)
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index cc5d250..bbe01e3 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -56,9 +56,16 @@ foreach(testName IN LISTS ALL_LOG4CXX_TESTS)
COMMAND ${testName} -v
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../resources
)
- set_tests_properties(${testName} PROPERTIES
- ENVIRONMENT "TOTO=wonderful;key1=value1;key2=value2"
- )
+
+ if(${testName} STREQUAL socketservertestcase)
+ set_tests_properties(socketservertestcase PROPERTIES
+ ENVIRONMENT "SOCKET_SERVER_COMMAND=$<JOIN:${START_SOCKET_SERVER_COMMAND}, >"
+ )
+ else()
+ set_tests_properties(${testName} PROPERTIES
+ ENVIRONMENT "TOTO=wonderful;key1=value1;key2=value2"
+ )
+ endif()
if(WIN32)
set_tests_properties(${testName} PROPERTIES ENVIRONMENT
"PATH=$<SHELL_PATH:$<TARGET_FILE_DIR:log4cxx>>$<SEMICOLON>$ENV{PATH}"
diff --git a/src/test/cpp/net/CMakeLists.txt b/src/test/cpp/net/CMakeLists.txt
index 888dec6..a11e603 100644
--- a/src/test/cpp/net/CMakeLists.txt
+++ b/src/test/cpp/net/CMakeLists.txt
@@ -3,7 +3,6 @@
set(NET_TESTS
socketappendertestcase
sockethubappendertestcase
- socketservertestcase
syslogappendertestcase
telnetappendertestcase
xmlsocketappendertestcase
@@ -14,4 +13,9 @@ endif(HAS_LIBESMPT)
foreach(fileName IN LISTS NET_TESTS)
add_executable(${fileName} "${fileName}.cpp")
endforeach()
+if(Java_Development_FOUND)
+ add_executable(socketservertestcase socketserverstarter.cpp socketservertestcase.cpp)
+ add_dependencies(socketservertestcase test-classes)
+ list(APPEND NET_TESTS socketservertestcase)
+endif(Java_Development_FOUND)
set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} ${NET_TESTS} PARENT_SCOPE)
diff --git a/src/test/cpp/net/socketserverstarter.cpp b/src/test/cpp/net/socketserverstarter.cpp
new file mode 100644
index 0000000..43e9d56
--- /dev/null
+++ b/src/test/cpp/net/socketserverstarter.cpp
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../logunit.h"
+
+#include <apr_thread_proc.h>
+#include <apr_env.h>
+#include <apr_file_io.h>
+#include <apr_strings.h>
+#include <apr_time.h>
+#include <log4cxx/helpers/pool.h>
+
+
+using namespace log4cxx;
+
+LOGUNIT_CLASS(SocketServerStarter)
+{
+ LOGUNIT_TEST_SUITE(SocketServerStarter);
+ LOGUNIT_TEST(startServer);
+ LOGUNIT_TEST_SUITE_END();
+
+public:
+ void setUp()
+ {
+ }
+
+ void tearDown()
+ {
+ }
+
+ void startServer()
+ {
+ helpers::Pool p;
+ apr_pool_t* pool = p.getAPRPool();
+ char* cmd = NULL;
+ apr_status_t stat = apr_env_get(&cmd, "SOCKET_SERVER_COMMAND", pool);
+
+ if (cmd && *cmd)
+ {
+ // prepare to launch the server
+ //
+ apr_proc_t server_pid;
+ apr_procattr_t* attr = NULL;
+ stat = apr_procattr_create(&attr, pool);
+ LOGUNIT_ASSERT(stat == APR_SUCCESS);
+ stat = apr_procattr_io_set(attr, APR_NO_PIPE, APR_NO_PIPE, APR_NO_PIPE);
+ LOGUNIT_ASSERT(stat == APR_SUCCESS);
+
+ //fprintf(stdout, "SOCKET_SERVER_COMMAND=%s\n", cmd);
+#ifdef SHELL_CMD_TYPE_WORKS
+ stat = apr_procattr_cmdtype_set(attr, APR_SHELLCMD);
+ LOGUNIT_ASSERT(stat == APR_SUCCESS);
+ stat = apr_proc_create(&server_pid, cmd, NULL, NULL, attr, pool);
+#else
+ stat = apr_procattr_cmdtype_set(attr, APR_PROGRAM);
+ LOGUNIT_ASSERT(stat == APR_SUCCESS);
+ // convert the space separated cmd string to the argument list
+ //
+ char** args = (char**)apr_palloc(pool, 15 * sizeof(*args));
+ char* pcmd = apr_pstrdup(pool, cmd);
+ int i = 0;
+ for (; i < 14 && pcmd && *pcmd; ++i)
+ {
+ args[i] = pcmd;
+ if (NULL != (pcmd = strchr(pcmd, ' ')))
+ {
+ while(' ' == *pcmd)
+ {
+ *pcmd = 0;
+ ++pcmd;
+ }
+ }
+ }
+ args[i] = 0;
+ //fprintf(stdout, "starting=%s with %d arguments\n", args[0], i);
+ stat = apr_proc_create(&server_pid, args[0], args, NULL, attr, pool);
+#endif
+
+
+ if (stat == APR_SUCCESS) // Allow server time to load
+ apr_sleep(1000000); // 1 seconds
+ }
+ else
+ fputs("The environment variable SOCKET_SERVER_COMMAND"
+ " must contain the server process path"
+ " followed by space separated command arguments\n", stderr);
+
+ LOGUNIT_ASSERT(stat == APR_SUCCESS);
+ }
+};
+
+
+LOGUNIT_TEST_SUITE_REGISTRATION(SocketServerStarter)
+
diff --git a/src/test/cpp/net/socketservertestcase.cpp b/src/test/cpp/net/socketservertestcase.cpp
index ce4444f..d46b378 100644
--- a/src/test/cpp/net/socketservertestcase.cpp
+++ b/src/test/cpp/net/socketservertestcase.cpp
@@ -38,7 +38,6 @@
#include "../logunit.h"
#include <log4cxx/spi/loggerrepository.h>
-
//Define INT64_C for compilers that don't have it
#if (!defined(INT64_C))
#define INT64_C(value) value ## LL
@@ -478,4 +477,4 @@ public:
const File SocketServerTestCase::TEMP("output/temp");
const File SocketServerTestCase::FILTERED("output/filtered");
-LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(SocketServerTestCase)
+LOGUNIT_TEST_SUITE_REGISTRATION(SocketServerTestCase)
diff --git a/src/test/java/CMakeLists.txt b/src/test/java/CMakeLists.txt
new file mode 100644
index 0000000..ff4af4b
--- /dev/null
+++ b/src/test/java/CMakeLists.txt
@@ -0,0 +1,18 @@
+include(FetchContent)
+FetchContent_Declare(log4j
+ URL https://www-us.apache.org/dist/logging/log4j/1.2.17/log4j-1.2.17.tar.gz
+ URL_HASH MD5=8218714e41ee0c6509dcfeafa2e1f53f
+)
+FetchContent_GetProperties(log4j)
+if(NOT log4j_POPULATED)
+ FetchContent_Populate(log4j)
+endif()
+set(log4j_CLASSPATH "${log4j_SOURCE_DIR}/log4j-1.2.17.jar" )
+set(SOCKET_SERVER_SOURCES org/apache/log4j/net/ShortSocketServer.java)
+add_custom_target(test-classes
+ COMMAND ${Java_JAVAC_EXECUTABLE} -d ${CMAKE_CURRENT_BINARY_DIR}
+ --class-path "${log4j_CLASSPATH}" ${SOCKET_SERVER_SOURCES}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
+set(SOCKET_SERVER_CLASSPATH "${CMAKE_CURRENT_BINARY_DIR}:${log4j_CLASSPATH}" )
+set(START_SOCKET_SERVER_COMMAND ${Java_JAVA_EXECUTABLE} --class-path ${SOCKET_SERVER_CLASSPATH} org.apache.log4j.net.ShortSocketServer 8 input/socketServer PARENT_SCOPE)
[logging-log4cxx] 46/49: Halt with an error if either APR or
APR-Util cannot be found
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit c8eb659f5ea573d144dd2f3f92c4ddcb10ef2736
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Sun Feb 9 18:27:50 2020 +1100
Halt with an error if either APR or APR-Util cannot be found
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 280d50d..2809445 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,10 +7,10 @@ include(CTest)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/src/cmake")
# Find Apache Runtime
-find_package(APR QUIET)
+find_package(APR REQUIRED)
# Find Apache Runtime Utilities
-find_package(APR-Util QUIET)
+find_package(APR-Util REQUIRED)
# Building
add_subdirectory(src)
[logging-log4cxx] 30/49: Use semantic versioning symbolic links in
the installed target
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 6862c5e5bdcb4606fffe59dcd3e47a019bc89763
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Sat Feb 1 16:38:38 2020 +1100
Use semantic versioning symbolic links in the installed target
---
src/main/cpp/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/main/cpp/CMakeLists.txt b/src/main/cpp/CMakeLists.txt
index cdf3034..779554a 100644
--- a/src/main/cpp/CMakeLists.txt
+++ b/src/main/cpp/CMakeLists.txt
@@ -164,3 +164,7 @@ target_sources(log4cxx
xmlsocketappender.cpp
zipcompressaction.cpp
)
+set_target_properties(log4cxx PROPERTIES
+ VERSION ${log4cxx_VERSION_MAJOR}.${log4cxx_VERSION_MINOR}.${log4cxx_VERSION_PATCH}
+ SOVERSION ${log4cxx_VERSION_MAJOR}
+)
[logging-log4cxx] 35/49: Only include smtpappendertestcase when
libesmtp is available
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit cd4a4552ca5c8e6f8ea52aec4d2e07814a3b6e42
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Feb 7 10:49:40 2020 +1100
Only include smtpappendertestcase when libesmtp is available
---
src/test/cpp/net/CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/test/cpp/net/CMakeLists.txt b/src/test/cpp/net/CMakeLists.txt
index 6bc5847..888dec6 100644
--- a/src/test/cpp/net/CMakeLists.txt
+++ b/src/test/cpp/net/CMakeLists.txt
@@ -1,7 +1,6 @@
# Tests defined in this directory
set(NET_TESTS
- smtpappendertestcase
socketappendertestcase
sockethubappendertestcase
socketservertestcase
@@ -9,6 +8,9 @@ set(NET_TESTS
telnetappendertestcase
xmlsocketappendertestcase
)
+if(HAS_LIBESMPT)
+ list(APPEND NET_TESTS smtpappendertestcase)
+endif(HAS_LIBESMPT)
foreach(fileName IN LISTS NET_TESTS)
add_executable(${fileName} "${fileName}.cpp")
endforeach()
[logging-log4cxx] 14/49: Set the letter case of find modules to
that required by case sensitive filesystems
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 472d97bd3e5f4b6eea0ce9a6206811171051055c
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Jan 31 17:50:16 2020 +1100
Set the letter case of find modules to that required by case sensitive filesystems
---
CMakeLists.txt | 4 ++--
pom.xml | 4 ++--
src/cmake/{findAPR-Util.cmake => FindAPR-Util.cmake} | 0
src/cmake/{findAPR.cmake => FindAPR.cmake} | 0
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index df334be..91cfb74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,13 +7,13 @@ include(CTest)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/src/cmake")
# Find Apache Runtime
-find_package(apr QUIET)
+find_package(APR QUIET)
# If APR find module sets the cache, the following will do nothing
find_path(APR_INCLUDE_DIR apr.h PATH_SUFFIXES apr-1)
find_library(APR_LIBRARIES NAMES libapr-1 apr-1)
# Find Apache Runtime Utilities
-find_package(apr-util QUIET)
+find_package(APR-Util QUIET)
# If APR-UTIL find module sets the cache, the following will do nothing
find_path(APR_UTIL_INCLUDE_DIR apu.h PATH_SUFFIXES apr-1)
find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1 aprutil-1)
diff --git a/pom.xml b/pom.xml
index bd32807..c0afaa2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
<groupId>log4cxx</groupId>
<artifactId>apache-log4cxx</artifactId>
<packaging>pom</packaging>
- <version>0.11.0</version>
+ <version>0.11.0-SNAPSHOT</version>
<name>Apache log4cxx</name>
<description>Logging framework for C++.</description>
<url>http://logging.apache.org/log4cxx</url>
@@ -65,7 +65,7 @@
<connection>scm:git:http://gitbox.apache.org/repos/asf/logging-log4cxx.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/logging-log4cxx.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=logging-log4cxx.git</url>
- <tag>v0.11.0-RC3</tag>
+ <tag>v0.11.0-RC1</tag>
</scm>
<properties>
diff --git a/src/cmake/findAPR-Util.cmake b/src/cmake/FindAPR-Util.cmake
similarity index 100%
rename from src/cmake/findAPR-Util.cmake
rename to src/cmake/FindAPR-Util.cmake
diff --git a/src/cmake/findAPR.cmake b/src/cmake/FindAPR.cmake
similarity index 100%
rename from src/cmake/findAPR.cmake
rename to src/cmake/FindAPR.cmake
[logging-log4cxx] 17/49: Merge
https://github.com/apache/logging-log4cxx
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 4ffba69e93d73c7bd28b13e7b3a40eaa61e157a1
Merge: 5b81898 ed1e4b4
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Jan 31 17:56:32 2020 +1100
Merge https://github.com/apache/logging-log4cxx
.editorconfig | 19 ++
autogen.sh | 4 +-
configure-aprutil.bat | 15 +-
configure.bat | 8 +-
release_perform.sh | 15 +-
release_prepare.sh | 4 +-
release_purge.sh | 6 +-
src/changes/changes.xml | 1 +
src/main/cpp/Makefile.am | 1 +
src/main/cpp/jsonlayout.cpp | 389 +++++++++++++++++++++++++++
src/main/include/log4cxx/Makefile.am | 1 +
src/main/include/log4cxx/jsonlayout.h | 139 ++++++++++
src/test/cpp/Makefile.am | 1 +
src/test/cpp/jsonlayouttest.cpp | 481 ++++++++++++++++++++++++++++++++++
14 files changed, 1058 insertions(+), 26 deletions(-)
[logging-log4cxx] 32/49: Fix failing defaultinittestcase
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit d08e392e9a354cd2f2c58c7ec0e81df521812de8
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Mon Feb 3 13:16:11 2020 +1100
Fix failing defaultinittestcase
---
src/test/cpp/CMakeLists.txt | 2 +-
src/test/cpp/defaultinit/CMakeLists.txt | 5 +++--
src/test/cpp/defaultinit/testcase1.cpp | 2 +-
src/test/cpp/defaultinit/testcase2.cpp | 4 +++-
src/test/cpp/defaultinit/testcase3.cpp | 4 +++-
src/test/cpp/defaultinit/testcase4.cpp | 4 +++-
6 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index cc5d250..9d7b0e3 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -53,7 +53,7 @@ foreach(testName IN LISTS ALL_LOG4CXX_TESTS)
target_include_directories(${testName} PRIVATE ${CMAKE_CURRENT_LIST_DIR} $<TARGET_PROPERTY:log4cxx,INCLUDE_DIRECTORIES>)
target_link_libraries(${testName} PRIVATE testingFramework testingUtilities log4cxx ${APR_LIBRARIES})
add_test(NAME ${testName}
- COMMAND ${testName} -v
+ COMMAND ${testName} -v ${${testName}_command_args}
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../resources
)
set_tests_properties(${testName} PROPERTIES
diff --git a/src/test/cpp/defaultinit/CMakeLists.txt b/src/test/cpp/defaultinit/CMakeLists.txt
index a9d2ee8..45d8dce 100644
--- a/src/test/cpp/defaultinit/CMakeLists.txt
+++ b/src/test/cpp/defaultinit/CMakeLists.txt
@@ -1,2 +1,3 @@
-add_executable(defaultinittestcase testcase1.cpp testcase2.cpp testcase3.cpp testcase4.cpp)
-set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} defaultinittestcase PARENT_SCOPE)
+add_executable(uninitializedtestcase testcase1.cpp)
+add_executable(defaultinittestcase testcase2.cpp testcase3.cpp testcase4.cpp)
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} uninitializedtestcase defaultinittestcase PARENT_SCOPE)
diff --git a/src/test/cpp/defaultinit/testcase1.cpp b/src/test/cpp/defaultinit/testcase1.cpp
index 9d60bb5..b0059a4 100644
--- a/src/test/cpp/defaultinit/testcase1.cpp
+++ b/src/test/cpp/defaultinit/testcase1.cpp
@@ -48,5 +48,5 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase1)
+LOGUNIT_TEST_SUITE_REGISTRATION(TestCase1)
diff --git a/src/test/cpp/defaultinit/testcase2.cpp b/src/test/cpp/defaultinit/testcase2.cpp
index 13c755d..df1d236 100644
--- a/src/test/cpp/defaultinit/testcase2.cpp
+++ b/src/test/cpp/defaultinit/testcase2.cpp
@@ -23,6 +23,7 @@
#include <log4cxx/logger.h>
#include "../insertwide.h"
#include "../logunit.h"
+#include <log4cxx/xml/domconfigurator.h>
using namespace log4cxx;
@@ -35,6 +36,7 @@ LOGUNIT_CLASS(TestCase2)
public:
void setUp()
{
+ log4cxx::xml::DOMConfigurator::configure("input/xml/defaultInit.xml");
}
void tearDown()
@@ -56,6 +58,6 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase2)
+LOGUNIT_TEST_SUITE_REGISTRATION(TestCase2)
diff --git a/src/test/cpp/defaultinit/testcase3.cpp b/src/test/cpp/defaultinit/testcase3.cpp
index 37e0761..da9471d 100644
--- a/src/test/cpp/defaultinit/testcase3.cpp
+++ b/src/test/cpp/defaultinit/testcase3.cpp
@@ -16,6 +16,7 @@
*/
#include <log4cxx/logmanager.h>
+#include <log4cxx/propertyconfigurator.h>
#include <log4cxx/logger.h>
#include "../insertwide.h"
#include "../logunit.h"
@@ -31,6 +32,7 @@ LOGUNIT_CLASS(TestCase3)
public:
void setUp()
{
+ PropertyConfigurator::configure(LOG4CXX_FILE("input/defaultInit3.properties"));
}
void tearDown()
@@ -52,4 +54,4 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase3)
+LOGUNIT_TEST_SUITE_REGISTRATION(TestCase3)
diff --git a/src/test/cpp/defaultinit/testcase4.cpp b/src/test/cpp/defaultinit/testcase4.cpp
index 64bc06e..1ff3a2e 100644
--- a/src/test/cpp/defaultinit/testcase4.cpp
+++ b/src/test/cpp/defaultinit/testcase4.cpp
@@ -21,6 +21,7 @@
#include <log4cxx/logmanager.h>
#include <log4cxx/logger.h>
+#include <log4cxx/xml/domconfigurator.h>
#include "../insertwide.h"
#include "../logunit.h"
@@ -35,6 +36,7 @@ LOGUNIT_CLASS(TestCase4)
public:
void setUp()
{
+ log4cxx::xml::DOMConfigurator::configure("input/xml/defaultInit.xml");
}
void tearDown()
@@ -57,5 +59,5 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase4)
+LOGUNIT_TEST_SUITE_REGISTRATION(TestCase4)
[logging-log4cxx] 03/49: Simplify integration into vcpkg
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit b4723004b6748ee16aa0551b71e043326e405b19
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Fri Oct 11 11:47:23 2019 +1100
Simplify integration into vcpkg
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75a907e..2c688f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,5 +49,5 @@ ENDIF()
install(EXPORT log4cxxTargets
FILE log4cxx-targets.cmake
NAMESPACE log4cxx::
- DESTINATION lib/cmake/log4cxx
+ DESTINATION share/cmake/log4cxx
)
[logging-log4cxx] 24/49: Remove unused files
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit dc7dc14ed884b6853fee53cc8c645ffce8d2b815
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Sat Feb 1 10:23:07 2020 +1100
Remove unused files
---
configure-aprutil.bat | 20 ----
src/site/apt/building/ant.apt | 229 ----------------------------------------
src/site/apt/building/xcode.apt | 65 ------------
3 files changed, 314 deletions(-)
diff --git a/configure-aprutil.bat b/configure-aprutil.bat
deleted file mode 100755
index 576c22e..0000000
--- a/configure-aprutil.bat
+++ /dev/null
@@ -1,20 +0,0 @@
-ECHO OFF
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements. See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License. You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-REM
-REM
-sed -i -e "s/#define APU_HAVE_APR_ICONV\b.*/#define APU_HAVE_APR_ICONV 0/" ..\apr-util\include\apu.hw
-sed -i -e "s/#define APR_HAS_LDAP\b.*/#define APR_HAS_LDAP 0/" ..\apr-util\include\apr_ldap.hw
-
diff --git a/src/site/apt/building/ant.apt b/src/site/apt/building/ant.apt
deleted file mode 100644
index ceb2838..0000000
--- a/src/site/apt/building/ant.apt
+++ /dev/null
@@ -1,229 +0,0 @@
-~~ Licensed to the Apache Software Foundation (ASF) under one or more
-~~ contributor license agreements. See the NOTICE file distributed with
-~~ this work for additional information regarding copyright ownership.
-~~ The ASF licenses this file to You under the Apache License, Version 2.0
-~~ (the "License"); you may not use this file except in compliance with
-~~ the License. You may obtain a copy of the License at
-~~
-~~ http://www.apache.org/licenses/LICENSE-2.0
-~~
-~~ Unless required by applicable law or agreed to in writing, software
-~~ distributed under the License is distributed on an "AS IS" BASIS,
-~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-~~ See the License for the specific language governing permissions and
-~~ limitations under the License.
- ------
- Building Apache log4cxx with Apache Ant
- ------
- ------
- ------
-
-Building Apache log4cxx with Apache Ant
-
- {{{https://ant.apache.org}Apache Ant}} with cpptasks from the
- {{{http://ant-contrib.sourceforge.net}Ant-Contrib}} project can be used to build log4cxx
- with supported compilers and is also used to generate the IDE project files included
- in the releases. The Apache Maven build which is used to generate the site documentation
- and release packaging delegates to this build. The Ant build can build APR and APR-Util
- if source is available.
-
-* Quick start:
-
- * Install {{{https://ant.apache.org}Apache Ant}} 1.6.5 or later.
-
- * Install cpptasks 1.0b5 or later from the {{{http://ant-contrib.sourceforge.net}Ant-Contrib Project}}.
- ant-contribs 1.0b3 or later is needed for some less frequent build targets.
-
- * Install APR and APR-Util or place source in apr and apr-util directories as a
- sibling to the log4cxx directory.
-
- * Install gzip and zip (used for compression by RollingFileAppender) and
- sed (used to normalize output files for comparison in unit tests).
-
- * Install log4j 1.2. Used in testing of SocketAppender.
-
- Building and testing log4cxx on a Unix platform with packaged APR and APR-Util.
-
-+----+
-$ export CLASSPATH=~/cpptasks/cpptasks-1.0b5.jar
-$ cd apache-log4cxx-x.x.x
-$ ant
-+----+
-
- Building and testing log4cxx on a Unix platform with APR and APR-Util built from source.
-
-+----+
-$ export CLASSPATH=~/cpptasks/cpptasks-1.0b5.jar
-$ tar -xvzf apr-1.2.12.tar.gz
-$ mv apr-1.2.12 apr
-$ tar -xvzf apr-util-1.2.12.tar.gz
-$ mv apr-util-1.2.12 apr-util
-$ cd apache-log4cxx-x.x.x
-$ ant
-+----+
-
- Building and testing log4cxx on a Microsoft Windows with APR and APR-Util built from source.
-
-+----+
-$ "%VS120COMNTOOLS%\vsvars32.bat"
-$ set PATH=\apache-ant-1.7.0\bin;%PATH%
-$ set CLASSPATH=\cpptasks\cpptasks-1.0b5.jar
-$ tar -xvzf apr-1.2.12.tar.gz
-$ rename apr-1.2.12 apr
-$ tar -xvzf apr-util-1.2.12.tar.gz
-$ rename apr-util-1.2.12 apr-util
-$ cd apache-log4cxx-x.x.x
-$ ant -Dcompiler=xyz
-+----+
-
-* Common ant targets
-
-*-----------------------+---------------------------------------------------------------------------------------------+
-| build | build log4cxx library. |
-*-----------------------+---------------------------------------------------------------------------------------------+
-| check | build logcxx library and build and run unit tests and examples. |
-*-----------------------+---------------------------------------------------------------------------------------------+
-| clean | Delete all generated files. |
-*-----------------------+---------------------------------------------------------------------------------------------+
-| build-unittest | build log4cxx library and unit test. |
-*-----------------------+---------------------------------------------------------------------------------------------+
-| run-socketserver | Tests SocketAppender with Java-based receiver. |
-*-----------------------+---------------------------------------------------------------------------------------------+
-| build-projects-vc6 | Build Microsoft Visual Studio 6 project files. |
-*-----------------------+---------------------------------------------------------------------------------------------+
-| build-projects-vc7 | Build Microsoft Visual Studio .NET project files. |
-*-----------------------+---------------------------------------------------------------------------------------------+
-| build-projects-vc8 | Build Microsoft Visual Studio 2005 project files. |
-*-----------------------+---------------------------------------------------------------------------------------------+
-| build-projects-vc9 | Build Microsoft Visual Studio 2008 project files. |
-*-----------------------+---------------------------------------------------------------------------------------------+
-| build-projects-xcode | Build Apple Xcode project files. |
-*-----------------------+---------------------------------------------------------------------------------------------+
-
- All build products will be placed in the target subdirectory.
-
- Project files should be generated after successfully building the library, however it is possible
- to generate Microsoft Visual Studio project files on other platforms. The project
- files will typically be missing references to the Platform SDK libraries.
- The Maven project modifies the generated project files for release preparation. Generation
- of Xcode projects from Microsoft Windows is not supported.
-
-* ant options
-
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Dcompiler | Compiler, see {{{http://ant-contrib.sourceforge.net/cpptasks/antdocs/CCTask.html}cpptasks documentation}} for full list. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Ddebug | Build for debugging, yes (default), no. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Dfind | Attempt to locate compiled APR and APR-Util, yes (default), no. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Dwith-apr | path to non-default location for APR. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Dwith-apr-util | path to non-default location for APR-Util. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Denable-char | Enable char API methods, choice of yes (default), no. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Denable-wchar_t | Enable wchar_t API methods, choice of yes (default), no. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Denable-unichar | Enable UniChar API methods, choice of yes, no (default). |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Denable-cfstring | Enable CFString API methods, requires Mac OS/X CoreFoundation, choice of yes, no (default). |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Dwith-logchar | Internal character representation, choice of utf-8 (default non-Windows), wchar_t (default Windows), unichar. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Dwith-charset | External character encoding, choice of utf-8, iso-8859-1, usascii, ebcdic, auto (default). |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Dwith-SMTP | SMTP implementation for SMTPAppender, choice of libesmtp, no (default). |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Dwith-ODBC | OBDC implementation for ODBCAppender, choice of auto (default), unixODBC, iODBC, Microsoft, no |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Dlog4j.jar | Path to log4j.jar for run-socketserver. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Dprojects.dir | Location for generated IDE projects. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Dlib.type | Library type to create, choice of shared (default), static. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Druntime | Type of C runtime library to use, choice of dynamic (default), static. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -Doptimize | Optimization: none (default), speed, size. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-| -p | Display available targets and quit. |
-*-------------------+--------------------------------------------------------------------------------------------------------------------------+
-
- SMTP and ODBC options can depend on libraries that that have different licenses. You should
- review the corresponding licenses and understand the implications before redistribution.
-
- Combining -Dlib.type=shared and -Druntime=static is unsafe.
-
- Properties may also be placed in a build.properties file in the log4cxx directory. The file has
- to be in the default format for {{{https://en.wikipedia.org/wiki/.properties}Java properties files}},
- especially one must not provide options using the syntax -Dxy=z like on the shell, but only as
- xy=z per line.
-
-* Platform specific notes:
-
- ** Microsoft Windows
-
- {{{http://gnuwin32.sourceforge.net}GnuWin32}}
- provides binary versions of sed, gzip and zip. Alternative,
- the bin directory of {{{https://www.cygwin.com}Cygwin}} may be placed on the path.
-
- If -Dwith-SMTP=libesmtp is specified, the build will attempt to build
- libesmtp from source, unfortunately libesmtp depends on poll.h and will not build.
-
- APR 1.2.12 has a known issue that will prevent
- compilation with Visual Studio 6 unless a later Platform SDK is installed.
- See APR bug {{{https://issues.apache.org/bugzilla/show_bug.cgi?44327}44327}}.
- APR 1.2.11 and the corresponding APR-Util 1.2.10 will compile with Visual Studio 6.
-
- If your are using Visual Studio, vsvars32.bat from the directory ...\Common7\Tools needs to be
- executed manually before a build. This script sets include paths etc., else you will get a lot
- of errors about missing windows.h and such.
-
- *** Cygwin:
-
- gcc 3.x does not provide wchar_t support which needs to be explicitly disabled.
- The Win32 path to the APR libraries need to be provided (CYGWIN_HOME/lib) if compiling against an installed APR and APR-Util.
-
-+-----+
-$ cd apache-log4cxx-x.x.x
-$ ant -Dos.family=cygwin -Dwith-apr=/cygwin/lib -Dwith-apr-util=/cygwin/lib -Denable-wchar_t=0
-+-----+
-
- *** MinGW:
-
-+----+
-$ cd apache-log4cxx-x.x.x
-$ path c:\mingw\bin;%PATH%
-$ ant -Dcompiler=gcc -Dfind=false build-all
-$ cd src\test\resources
-$ set TOTO=wonderful
-$ set key1=value1
-$ set key2=value2
-$ ..\..\..\target\debug\shared\testsuite -v
-$ ..\..\..\target\debug\shared\trivial
-$ ..\..\..\target\debug\shared\stream
-+----+
-
- Running "ant check" was observed to fail with unexpected exceptions
- in streamtestcase and datetimedateformattestcase.
- See {{{https://issues.apache.org/jira/browse/LOGCXX-244}LOGCXX-244}}.
-
- ** Debian:
-
- Apache APR, APR-Util, Ant and log4j and zip may be installed using:
-
-+----+
-$ sudo apt-get install libapr1-dev libaprutil1-dev ant ant-optional liblog4j1.2-java zip
-+----+
-
- ** Mac OS/X:
-
- APR and APR-Util are provided by the platform in Mac OS/X 10.5 and iODBC in 10.4.
-
- Site generation requires "doxygen" command on path which can be provided
- by installing Doxygen.app and then setting the path like:
-
-+---+
-$ setenv PATH /Applications/Doxygen.app/Contents/Resources:$PATH
-+---+
diff --git a/src/site/apt/building/xcode.apt b/src/site/apt/building/xcode.apt
deleted file mode 100644
index 33a163a..0000000
--- a/src/site/apt/building/xcode.apt
+++ /dev/null
@@ -1,65 +0,0 @@
-~~ Licensed to the Apache Software Foundation (ASF) under one or more
-~~ contributor license agreements. See the NOTICE file distributed with
-~~ this work for additional information regarding copyright ownership.
-~~ The ASF licenses this file to You under the Apache License, Version 2.0
-~~ (the "License"); you may not use this file except in compliance with
-~~ the License. You may obtain a copy of the License at
-~~
-~~ http://www.apache.org/licenses/LICENSE-2.0
-~~
-~~ Unless required by applicable law or agreed to in writing, software
-~~ distributed under the License is distributed on an "AS IS" BASIS,
-~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-~~ See the License for the specific language governing permissions and
-~~ limitations under the License.
- ------
- Building Apache log4cxx with Apple Xcode
- ------
- ------
- ------
-
-Building Apache log4cxx with Apple Xcode
-
-*Building log4cxx.dylib
-
- Run configure to generate log4cxx.h and log4cxx_private.h
- then launch Xcode.
-
-+----+
-cd apache-log4cxx-x.x.x
-./configure
-open projects/log4cxx.xcodeproj
-+----+
-
-
-*Running unit tests
-
- Run configure then open projects/testsuite.xcodeproj
- or projects/testsuite-standalone.xcodeproj
- (test suite and implementation in one project) in Xcode.
-
- The unit tests require the working directory and several environment variables
- to be set. To set these, select the executable in Groups & Files, press Info and:
-
- * In the General pane, set Working Directory to Custom with path "../src/test/resources".
-
- * In the Arguments pane, add following key value pairs to "Variables to be set in the environment":
- TOTO=wonderful, key1=value1 and key2=value2.
-
- * In the Arguments pane, add "-v" for verbose output, or individual test names in "Arguments to be passed on launch".
-
-*Issues
-
- The project file generation does does not
- properly create an entry in the "Link Binary with Libraries"
- build phase for projects (such as the examples and unit tests) that depend
- on log4cxx. To work around the problem, open the project in Xcode and
- in the Groups & Files pane, drag log4cxx.dylib
- and drop on the "Link Binary with Libraries" folder
- under Targets.
-
- See issue {{{https://issues.apache.org/jira/browse/LOGCXX-245}LOGCXX-245}} for further information.
-
- The projects provided in the release target Mac OS/X 10.5 which provides
- preinstalled APR and APR-Util libraries. To generate XCode projects to target Mac OS/X 10.4,
- set up the ant build and then "ant build-projects-xcode -Dfind=false".
[logging-log4cxx] 21/49: Merge branch 'master' of
https://github.com/stephen-webb/logging-log4cxx
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit f3edfc4f629847254e43e298d2e50a631d521193
Merge: 0504bc5 c3146a5
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Sat Feb 1 10:16:16 2020 +1100
Merge branch 'master' of https://github.com/stephen-webb/logging-log4cxx
src/main/cpp/CMakeLists.txt | 1 +
src/test/cpp/CMakeLists.txt | 1 +
2 files changed, 2 insertions(+)
[logging-log4cxx] 39/49: Fix typo in instructions for building from
source on Windows
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 6ae3567d7d13217dddc72cba92034e856ed38158
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Feb 7 16:25:13 2020 +1100
Fix typo in instructions for building from source on Windows
---
src/site/apt/building/cmake.apt | 2 +-
src/site/apt/building/maven.apt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/site/apt/building/cmake.apt b/src/site/apt/building/cmake.apt
index 4e1e888..6f4d876 100644
--- a/src/site/apt/building/cmake.apt
+++ b/src/site/apt/building/cmake.apt
@@ -53,7 +53,7 @@ $ sudo make install
cmake --build buildtrees\expat --target install --config Release
cmake -S apr-1.7.0 -B buildtrees\apr -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
cmake --build buildtrees\apr --target install --config Release
- set CMAKE_PATH_PREFIX=%HOMEPATH%\Libraries\installed
+ set CMAKE_PREFIX_PATH=%HOMEPATH%\Libraries\installed
cmake -S apr-util-1.6.1 -B buildtrees\apr-util -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
cmake --build buildtrees\apr-util --target install --config Release
cmake -S apache-log4cxx-x.x.x -B buildtrees\log4cxx -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
diff --git a/src/site/apt/building/maven.apt b/src/site/apt/building/maven.apt
index 865cc5a..2fa52a3 100644
--- a/src/site/apt/building/maven.apt
+++ b/src/site/apt/building/maven.apt
@@ -50,7 +50,7 @@ Building Apache log4cxx with Apache Maven 2
cmake --build buildtrees\expat --target install --config Release
cmake -S apr-1.7.0 -B buildtrees\apr -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
cmake --build buildtrees\apr --target install --config Release
- set CMAKE_PATH_PREFIX=%HOMEPATH%\Libraries\installed
+ set CMAKE_PREFIX_PATH=%HOMEPATH%\Libraries\installed
cmake -S apr-util-1.6.1 -B buildtrees\apr-util -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
cmake --build buildtrees\apr-util --target install --config Release
cd apache-log4cxx-x.x.x
[logging-log4cxx] 16/49: Merge branch 'master' of
https://github.com/stephen-webb/logging-log4cxx
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 0504bc526c5e86bc6700cfa14cf9dda1175bf2b7
Merge: 704a80f 5b81898
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Fri Jan 31 17:53:26 2020 +1100
Merge branch 'master' of https://github.com/stephen-webb/logging-log4cxx
CMakeLists.txt | 4 ++--
src/cmake/{findAPR-Util.cmake => FindAPR-Util.cmake} | 0
src/cmake/{findAPR.cmake => FindAPR.cmake} | 0
3 files changed, 2 insertions(+), 2 deletions(-)
[logging-log4cxx] 26/49: Merge branch
'replace-ant-build-with-cmake' of
https://github.com/stephen-webb/logging-log4cxx into
replace-ant-build-with-cmake
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 7995db238b989ddf1764fb336b576921c6d812d1
Merge: b3bec51 426660e
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Sat Feb 1 10:25:48 2020 +1100
Merge branch 'replace-ant-build-with-cmake' of https://github.com/stephen-webb/logging-log4cxx into replace-ant-build-with-cmake
pom.xml | 2 +-
src/changes/changes.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[logging-log4cxx] 27/49: Fix some test case failures
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 8dc81206703df5a366c21b52d00538accad4dd28
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Sat Feb 1 10:34:26 2020 +1100
Fix some test case failures
---
src/test/cpp/CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index 1c359fb..cc5d250 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -55,11 +55,13 @@ foreach(testName IN LISTS ALL_LOG4CXX_TESTS)
add_test(NAME ${testName}
COMMAND ${testName} -v
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../resources
+ )
+ set_tests_properties(${testName} PROPERTIES
ENVIRONMENT "TOTO=wonderful;key1=value1;key2=value2"
)
if(WIN32)
set_tests_properties(${testName} PROPERTIES ENVIRONMENT
"PATH=$<SHELL_PATH:$<TARGET_FILE_DIR:log4cxx>>$<SEMICOLON>$ENV{PATH}"
- )
+ )
endif()
endforeach()
[logging-log4cxx] 10/49: Set the letter case of find modules to
that required by case sensitive filesystems
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit a71f9363bceef660ae5c0874ea54abf1b2abfe7b
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Jan 31 17:16:52 2020 +1100
Set the letter case of find modules to that required by case sensitive filesystems
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 1bd985a..bd32807 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,7 +65,7 @@
<connection>scm:git:http://gitbox.apache.org/repos/asf/logging-log4cxx.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/logging-log4cxx.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=logging-log4cxx.git</url>
- <tag>v0.11.0-RC1</tag>
+ <tag>v0.11.0-RC3</tag>
</scm>
<properties>
[logging-log4cxx] 28/49: Use automatic checks instead of options
for log4cxx_private.h configuration
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 4745721f678f52788c47a6f2bf486b3131fd5375
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Sat Feb 1 13:11:06 2020 +1100
Use automatic checks instead of options for log4cxx_private.h configuration
---
src/main/include/CMakeLists.txt | 36 ++++++++++++++++++++++++++----------
1 file changed, 26 insertions(+), 10 deletions(-)
diff --git a/src/main/include/CMakeLists.txt b/src/main/include/CMakeLists.txt
index 1939886..d1a0bb2 100644
--- a/src/main/include/CMakeLists.txt
+++ b/src/main/include/CMakeLists.txt
@@ -67,22 +67,38 @@ elseif(${LOG4CXX_CHARSET} STREQUAL "utf-8")
set(CHARSET_UTF8 1)
endif()
-option(LOG4CXX_HAS_STD_LOCALE "Is the standard locale header available?" OFF)
-option(LOG4CXX_HAS_ODBC "Build with ODBC appender?" OFF)
-option(LOG4CXX_HAS_MBSRTOWCS "Default character encoder converts multi-byte string to LogString using mbstowcs()?" OFF)
-option(LOG4CXX_HAS_WCSTOMBS "Default wide character encoder converts using wcstombs()?" OFF)
-option(LOG4CXX_HAS_FWIDE "Is the fwide(fd) function available?" OFF)
-option(LOG4CXX_HAS_LIBESMTP "Use libESMTP in SMTPAppender?" OFF)
-option(LOG4CXX_HAS_SYSLOG "Is the syslog function available?" OFF)
+#
+# Test for various functions
+#
+include(CheckFunctionExists)
+include(CheckCXXSymbolExists)
+include(CheckIncludeFiles)
+include(CheckIncludeFileCXX)
+include(CheckLibraryExists)
+
+CHECK_INCLUDE_FILE_CXX(locale HAS_STD_LOCALE)
+CHECK_INCLUDE_FILES(sqlext.h HAS_ODBC)
+CHECK_FUNCTION_EXISTS(mbsrtowcs HAS_MBSRTOWCS)
+CHECK_FUNCTION_EXISTS(wcstombs HAS_WCSTOMBS)
+CHECK_FUNCTION_EXISTS(fwide HAS_FWIDE)
+CHECK_LIBRARY_EXISTS(esmtp smtp_create_session "" HAS_LIBESMTP)
+CHECK_FUNCTION_EXISTS(syslog HAS_SYSLOG)
foreach(varName HAS_STD_LOCALE HAS_ODBC HAS_MBSRTOWCS HAS_WCSTOMBS HAS_FWIDE HAS_LIBESMTP HAS_SYSLOG)
- if(${LOG4CXX_${varName}})
- set(${varName} 1)
+ if(${varName} EQUAL 0)
+ continue()
+ elseif(${varName} EQUAL 1)
+ continue()
+ elseif("${varName}" STREQUAL "ON")
+ set(${varName} 1 )
+ elseif("${varName}" STREQUAL "OFF")
+ set(${varName} 0 )
else()
- set(${varName} 0)
+ set(${varName} 0 )
endif()
endforeach()
+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/private/log4cxx_private.h.in
${CMAKE_CURRENT_BINARY_DIR}/log4cxx/private/log4cxx_private.h
@ONLY
[logging-log4cxx] 45/49: Merge branch
'replace-ant-build-with-cmake' of
https://github.com/stephen-webb/logging-log4cxx into
replace-ant-build-with-cmake
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 20270107e843bddffd7ad3eb6afb33cfa4cb653f
Merge: 178598b 84d3b60
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Sun Feb 9 18:21:02 2020 +1100
Merge branch 'replace-ant-build-with-cmake' of https://github.com/stephen-webb/logging-log4cxx into replace-ant-build-with-cmake
src/site/apt/building/cmake.apt | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
[logging-log4cxx] 44/49: Allow tests on Windows to be run from ctest
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 178598b7e5be9f8a5704e20ea752c1ee438b5aca
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Sun Feb 9 18:19:46 2020 +1100
Allow tests on Windows to be run from ctest
---
CMakeLists.txt | 6 ------
src/cmake/FindAPR-Util.cmake | 5 +++++
src/cmake/FindAPR.cmake | 5 +++++
src/test/cpp/CMakeLists.txt | 32 ++++++++++++++++++++------------
4 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b46e1e..280d50d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,15 +8,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/src/cmake")
# Find Apache Runtime
find_package(APR QUIET)
-# If APR find module sets the cache, the following will do nothing
-find_path(APR_INCLUDE_DIR apr.h PATH_SUFFIXES apr-1)
-find_library(APR_LIBRARIES NAMES libapr-1 apr-1)
# Find Apache Runtime Utilities
find_package(APR-Util QUIET)
-# If APR-UTIL find module sets the cache, the following will do nothing
-find_path(APR_UTIL_INCLUDE_DIR apu.h PATH_SUFFIXES apr-1)
-find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1 aprutil-1)
# Building
add_subdirectory(src)
diff --git a/src/cmake/FindAPR-Util.cmake b/src/cmake/FindAPR-Util.cmake
index 3485911..9b1ec68 100644
--- a/src/cmake/FindAPR-Util.cmake
+++ b/src/cmake/FindAPR-Util.cmake
@@ -4,6 +4,7 @@ include(FindPackageHandleStandardArgs)
# This module defines
# APR_UTIL_INCLUDE_DIR, where to find apr.h, etc.
# APR_UTIL_LIBRARIES, the libraries to link against to use APR.
+# APR_UTIL_DLL_DIR, where to find libaprutil-1.dll
# APR_UTIL_FOUND, set to yes if found
macro(_apu_invoke _varname)
@@ -34,6 +35,10 @@ mark_as_advanced(APR_UTIL_CONFIG_EXECUTABLE)
if(EXISTS ${APR_UTIL_CONFIG_EXECUTABLE})
_apu_invoke(APR_UTIL_INCLUDE_DIR --includedir)
_apu_invoke(APR_UTIL_LIBRARIES --link-ld)
+else()
+ find_path(APR_UTIL_INCLUDE_DIR apu.h PATH_SUFFIXES apr-1)
+ find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1 aprutil-1)
+ find_path(APR_UTIL_DLL_DIR libaprutil-1.dll)
endif()
find_package_handle_standard_args(apr-util DEFAULT_MSG
diff --git a/src/cmake/FindAPR.cmake b/src/cmake/FindAPR.cmake
index 171d745..7678519 100644
--- a/src/cmake/FindAPR.cmake
+++ b/src/cmake/FindAPR.cmake
@@ -4,6 +4,7 @@ include(FindPackageHandleStandardArgs)
# This module defines
# APR_INCLUDE_DIR, where to find apr.h, etc.
# APR_LIBRARIES, the libraries to link against to use APR.
+# APR_DLL_DIR, where to find libapr-1.dll
# APR_FOUND, set to 'yes' if found
macro(_apr_invoke _varname)
execute_process(
@@ -33,6 +34,10 @@ mark_as_advanced(APR_CONFIG_EXECUTABLE)
if(EXISTS ${APR_CONFIG_EXECUTABLE})
_apr_invoke(APR_INCLUDE_DIR --includedir)
_apr_invoke(APR_LIBRARIES --link-ld)
+else()
+ find_path(APR_INCLUDE_DIR apr.h PATH_SUFFIXES apr-1)
+ find_library(APR_LIBRARIES NAMES libapr-1 apr-1)
+ find_path(APR_DLL_DIR libapr-1.dll)
endif()
find_package_handle_standard_args(apr
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index bbe01e3..8d5cfbe 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -57,18 +57,26 @@ foreach(testName IN LISTS ALL_LOG4CXX_TESTS)
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../resources
)
- if(${testName} STREQUAL socketservertestcase)
- set_tests_properties(socketservertestcase PROPERTIES
- ENVIRONMENT "SOCKET_SERVER_COMMAND=$<JOIN:${START_SOCKET_SERVER_COMMAND}, >"
- )
- else()
- set_tests_properties(${testName} PROPERTIES
- ENVIRONMENT "TOTO=wonderful;key1=value1;key2=value2"
- )
- endif()
if(WIN32)
- set_tests_properties(${testName} PROPERTIES ENVIRONMENT
- "PATH=$<SHELL_PATH:$<TARGET_FILE_DIR:log4cxx>>$<SEMICOLON>$ENV{PATH}"
- )
+ set(LOG4CXX_DLL_DIR "$<SHELL_PATH:$<TARGET_FILE_DIR:log4cxx>>")
+ if(${testName} STREQUAL socketservertestcase)
+ set_tests_properties(socketservertestcase PROPERTIES
+ ENVIRONMENT "SOCKET_SERVER_COMMAND=$<JOIN:${START_SOCKET_SERVER_COMMAND}, >;PATH=${LOG4CXX_DLL_DIR}\;${APR_DLL_DIR}\;${APR_UTIL_DLL_DIR}"
+ )
+ else()
+ set_tests_properties(${testName} PROPERTIES
+ ENVIRONMENT "TOTO=wonderful;key1=value1;key2=value2;PATH==${LOG4CXX_DLL_DIR}\;${APR_DLL_DIR}\;${APR_UTIL_DLL_DIR}"
+ )
+ endif()
+ else()
+ if(${testName} STREQUAL socketservertestcase)
+ set_tests_properties(socketservertestcase PROPERTIES
+ ENVIRONMENT "SOCKET_SERVER_COMMAND=$<JOIN:${START_SOCKET_SERVER_COMMAND}, >"
+ )
+ else()
+ set_tests_properties(${testName} PROPERTIES
+ ENVIRONMENT "TOTO=wonderful;key1=value1;key2=value2"
+ )
+ endif()
endif()
endforeach()
[logging-log4cxx] 36/49: Run autoconf during packaging if the OS is
unix
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit d5b5c38e9e56020a777d9a2cd3423decd0bbf968
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Feb 7 12:57:10 2020 +1100
Run autoconf during packaging if the OS is unix
---
build.xml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/build.xml b/build.xml
index d4d292a..8c7fed7 100644
--- a/build.xml
+++ b/build.xml
@@ -191,9 +191,6 @@
/>
</path>
</foreach>
- <property name="project.type"
- value="msvc6"
- />
<cc objdir="${target.dir}/header-check"
name="gcc"
exceptions="true"
@@ -497,6 +494,7 @@
</target>
<target name="autogen"
+ depends="init"
if="is-unix">
<exec executable="sh">
<arg value="autogen.sh" />
[logging-log4cxx] 19/49: Add JSON appender and test
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 73f733386c68f471aaf31e09201a7d62687051e4
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Jan 31 17:59:52 2020 +1100
Add JSON appender and test
---
src/main/cpp/CMakeLists.txt | 1 +
src/test/cpp/CMakeLists.txt | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/main/cpp/CMakeLists.txt b/src/main/cpp/CMakeLists.txt
index 3571cf5..cdf3034 100644
--- a/src/main/cpp/CMakeLists.txt
+++ b/src/main/cpp/CMakeLists.txt
@@ -67,6 +67,7 @@ target_sources(log4cxx
inputstreamreader.cpp
integer.cpp
integerpatternconverter.cpp
+ jsonlayout.cpp
layout.cpp
level.cpp
levelmatchfilter.cpp
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index 7a0ada9..793a30b 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -14,6 +14,7 @@ set(ALL_LOG4CXX_TESTS
filetestcase
hierarchytest
hierarchythresholdtestcase
+ jsonlayouttest
l7dtestcase
leveltestcase
loggertestcase
[logging-log4cxx] 15/49: Set the letter case of find modules to
that required by case sensitive filesystems
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 5b818988b6453f182380a5d5caa93d4c108678d0
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Jan 31 17:50:16 2020 +1100
Set the letter case of find modules to that required by case sensitive filesystems
---
CMakeLists.txt | 4 ++--
src/cmake/{findAPR-Util.cmake => FindAPR-Util.cmake} | 0
src/cmake/{findAPR.cmake => FindAPR.cmake} | 0
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index df334be..91cfb74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,13 +7,13 @@ include(CTest)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/src/cmake")
# Find Apache Runtime
-find_package(apr QUIET)
+find_package(APR QUIET)
# If APR find module sets the cache, the following will do nothing
find_path(APR_INCLUDE_DIR apr.h PATH_SUFFIXES apr-1)
find_library(APR_LIBRARIES NAMES libapr-1 apr-1)
# Find Apache Runtime Utilities
-find_package(apr-util QUIET)
+find_package(APR-Util QUIET)
# If APR-UTIL find module sets the cache, the following will do nothing
find_path(APR_UTIL_INCLUDE_DIR apu.h PATH_SUFFIXES apr-1)
find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1 aprutil-1)
diff --git a/src/cmake/findAPR-Util.cmake b/src/cmake/FindAPR-Util.cmake
similarity index 100%
rename from src/cmake/findAPR-Util.cmake
rename to src/cmake/FindAPR-Util.cmake
diff --git a/src/cmake/findAPR.cmake b/src/cmake/FindAPR.cmake
similarity index 100%
rename from src/cmake/findAPR.cmake
rename to src/cmake/FindAPR.cmake
[logging-log4cxx] 34/49: Fix failing defaultinittestcase
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit b9d9b0eb3c90f7fc5c4c940e57f0113290cfa155
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Mon Feb 3 17:11:40 2020 +1100
Fix failing defaultinittestcase
---
src/test/cpp/defaultinit/testcase1.cpp | 2 +-
src/test/cpp/defaultinit/testcase2.cpp | 10 ++++++++--
src/test/cpp/defaultinit/testcase3.cpp | 8 +++++++-
src/test/cpp/defaultinit/testcase4.cpp | 8 +++++++-
4 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/src/test/cpp/defaultinit/testcase1.cpp b/src/test/cpp/defaultinit/testcase1.cpp
index 9d60bb5..b0059a4 100644
--- a/src/test/cpp/defaultinit/testcase1.cpp
+++ b/src/test/cpp/defaultinit/testcase1.cpp
@@ -48,5 +48,5 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase1)
+LOGUNIT_TEST_SUITE_REGISTRATION(TestCase1)
diff --git a/src/test/cpp/defaultinit/testcase2.cpp b/src/test/cpp/defaultinit/testcase2.cpp
index 13c755d..1c362c2 100644
--- a/src/test/cpp/defaultinit/testcase2.cpp
+++ b/src/test/cpp/defaultinit/testcase2.cpp
@@ -21,6 +21,8 @@
#include <log4cxx/logmanager.h>
#include <log4cxx/logger.h>
+#include <log4cxx/helpers/pool.h>
+#include <apr_file_io.h>
#include "../insertwide.h"
#include "../logunit.h"
@@ -35,17 +37,21 @@ LOGUNIT_CLASS(TestCase2)
public:
void setUp()
{
+ helpers::Pool p;
+ apr_file_copy("input/xml/defaultInit.xml", "log4cxx.xml", APR_FPROT_UREAD|APR_FPROT_UWRITE, p.getAPRPool());
}
void tearDown()
{
+ helpers::Pool p;
+ apr_file_remove("log4cxx.xml", p.getAPRPool());
LogManager::shutdown();
}
void xmlTest()
{
LoggerPtr root = Logger::getRootLogger();
- LOG4CXX_DEBUG(root, "Hello, world");
+ LOG4CXX_DEBUG(root, "Hello, world");
bool rootIsConfigured = !root->getAllAppenders().empty();
LOGUNIT_ASSERT(rootIsConfigured);
@@ -56,6 +62,6 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase2)
+LOGUNIT_TEST_SUITE_REGISTRATION(TestCase2)
diff --git a/src/test/cpp/defaultinit/testcase3.cpp b/src/test/cpp/defaultinit/testcase3.cpp
index 37e0761..2b36f28 100644
--- a/src/test/cpp/defaultinit/testcase3.cpp
+++ b/src/test/cpp/defaultinit/testcase3.cpp
@@ -17,6 +17,8 @@
#include <log4cxx/logmanager.h>
#include <log4cxx/logger.h>
+#include <log4cxx/helpers/pool.h>
+#include <apr_file_io.h>
#include "../insertwide.h"
#include "../logunit.h"
@@ -31,10 +33,14 @@ LOGUNIT_CLASS(TestCase3)
public:
void setUp()
{
+ helpers::Pool p;
+ apr_file_copy("input/defaultInit3.properties", "log4cxx.properties", APR_FPROT_UREAD|APR_FPROT_UWRITE, p.getAPRPool());
}
void tearDown()
{
+ helpers::Pool p;
+ apr_file_remove("log4cxx.properties", p.getAPRPool());
LogManager::shutdown();
}
@@ -52,4 +58,4 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase3)
+LOGUNIT_TEST_SUITE_REGISTRATION(TestCase3)
diff --git a/src/test/cpp/defaultinit/testcase4.cpp b/src/test/cpp/defaultinit/testcase4.cpp
index 64bc06e..d22806a 100644
--- a/src/test/cpp/defaultinit/testcase4.cpp
+++ b/src/test/cpp/defaultinit/testcase4.cpp
@@ -21,6 +21,8 @@
#include <log4cxx/logmanager.h>
#include <log4cxx/logger.h>
+#include <log4cxx/helpers/pool.h>
+#include <apr_file_io.h>
#include "../insertwide.h"
#include "../logunit.h"
@@ -35,10 +37,14 @@ LOGUNIT_CLASS(TestCase4)
public:
void setUp()
{
+ helpers::Pool p;
+ apr_file_copy("input/xml/defaultInit.xml", "log4cxx.xml", APR_FPROT_UREAD|APR_FPROT_UWRITE, p.getAPRPool());
}
void tearDown()
{
+ helpers::Pool p;
+ apr_file_remove("log4cxx.xml", p.getAPRPool());
LogManager::shutdown();
}
@@ -57,5 +63,5 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase4)
+LOGUNIT_TEST_SUITE_REGISTRATION(TestCase4)
[logging-log4cxx] 20/49: Merge
https://github.com/apache/logging-log4cxx into replace-ant-build-with-cmake
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 426660e7452f05de3a7818171768aa76de9b9528
Merge: 73f7333 ed1e4b4
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Jan 31 18:02:38 2020 +1100
Merge https://github.com/apache/logging-log4cxx into replace-ant-build-with-cmake
.editorconfig | 19 ++
autogen.sh | 4 +-
configure-aprutil.bat | 15 +-
configure.bat | 8 +-
release_perform.sh | 15 +-
release_prepare.sh | 4 +-
release_purge.sh | 6 +-
src/changes/changes.xml | 1 +
src/main/cpp/Makefile.am | 1 +
src/main/cpp/jsonlayout.cpp | 389 +++++++++++++++++++++++++++
src/main/include/log4cxx/Makefile.am | 1 +
src/main/include/log4cxx/jsonlayout.h | 139 ++++++++++
src/test/cpp/Makefile.am | 1 +
src/test/cpp/jsonlayouttest.cpp | 481 ++++++++++++++++++++++++++++++++++
14 files changed, 1058 insertions(+), 26 deletions(-)
[logging-log4cxx] 43/49: Add platform specific instructions for
cmake install
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 84d3b60182550be464908c4809dfc546a62de42d
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Sun Feb 9 13:46:13 2020 +1100
Add platform specific instructions for cmake install
---
src/site/apt/building/cmake.apt | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/site/apt/building/cmake.apt b/src/site/apt/building/cmake.apt
index 6f4d876..d76afc9 100644
--- a/src/site/apt/building/cmake.apt
+++ b/src/site/apt/building/cmake.apt
@@ -66,12 +66,25 @@ $ sudo make install
APR and APR-Util are provided by the platform in Mac OS/X 10.5 and iODBC in 10.4.
+ cmake can be installed by typing "brew install cmake"
+
** Debian:
- APR, APR-Util, gzip and zip may be installed by:
+ APR, APR-Util, openssl, gzip and zip may be installed by:
+----+
-$ sudo apt-get install libapr1-dev libaprutil1-dev gzip zip
+$ sudo apt-get install libssl-dev libapr1-dev libaprutil1-dev gzip zip
++----+
+
+ CMake can be built from source by typing:
+
++----+
+$ wget https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4.tar.gz
+$ tar xf cmake-3.16.4.tar.gz
+$ cd cmake-3.16.4
+$ ./bootstrap
+$ make
+$ sudo make install
+----+
** FreeBSD:
[logging-log4cxx] 01/49: Add support for building and testing with
cmake
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit a85331089549d24401db642575b1e893a38a7450
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Sun Oct 6 14:48:33 2019 +1100
Add support for building and testing with cmake
---
CMakeLists.txt | 53 ++++++++++
src/CMakeLists.txt | 12 +++
src/main/CMakeLists.txt | 9 ++
src/main/cpp/CMakeLists.txt | 165 +++++++++++++++++++++++++++++++
src/main/include/CMakeLists.txt | 97 ++++++++++++++++++
src/test/CMakeLists.txt | 1 +
src/test/cpp/CMakeLists.txt | 63 ++++++++++++
src/test/cpp/customlogger/CMakeLists.txt | 2 +
src/test/cpp/db/CMakeLists.txt | 3 +
src/test/cpp/defaultinit/CMakeLists.txt | 2 +
src/test/cpp/filter/CMakeLists.txt | 9 ++
src/test/cpp/helpers/CMakeLists.txt | 28 ++++++
src/test/cpp/net/CMakeLists.txt | 15 +++
src/test/cpp/nt/CMakeLists.txt | 2 +
src/test/cpp/pattern/CMakeLists.txt | 2 +
src/test/cpp/rolling/CMakeLists.txt | 14 +++
src/test/cpp/spi/CMakeLists.txt | 2 +
src/test/cpp/util/CMakeLists.txt | 21 ++++
src/test/cpp/varia/CMakeLists.txt | 10 ++
src/test/cpp/xml/CMakeLists.txt | 7 ++
20 files changed, 517 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..5286f30
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,53 @@
+cmake_minimum_required(VERSION 3.13)
+project(log4cxx VERSION 0.10.0 LANGUAGES CXX)
+
+# Find Apache Runtime
+find_package(apr QUIET)
+# If APR find module sets the cache, the following will do nothing
+find_path(APR_INCLUDE_DIR apr.h)
+find_library(APR_LIBRARIES NAMES libapr-1 apr-1)
+
+# Find Apache Runtime Utilities
+find_package(apr-util QUIET)
+# If APR-UTIL find module sets the cache, the following will do nothing
+find_path(APR_UTIL_INCLUDE_DIR apu.h)
+find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1 aprutil-1)
+
+## Testing
+option(TEST_LOG4CXX "Build log4cxx tests" ON)
+if(TEST_LOG4CXX)
+ enable_testing()
+endif()
+
+# Building
+add_subdirectory(src)
+
+## Installing
+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/src/main/include/log4cxx
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ FILES_MATCHING PATTERN "*.h"
+)
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/main/include/log4cxx
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ FILES_MATCHING PATTERN "*.h"
+)
+
+install(TARGETS log4cxx EXPORT log4cxxTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+)
+IF(LOG4CXX_INSTALL_PDB)
+ INSTALL(FILES log4cxx.pdb
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
+ CONFIGURATIONS RelWithDebInfo Debug
+ )
+ENDIF()
+
+# create export file which can be imported by other cmake projects
+install(EXPORT log4cxxTargets
+ FILE log4cxx-targets.cmake
+ NAMESPACE log4cxx::
+ DESTINATION lib/cmake/log4cxx
+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..95e66e1
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,12 @@
+add_subdirectory(main)
+target_include_directories(log4cxx INTERFACE $<INSTALL_INTERFACE:include> PRIVATE ${APR_INCLUDE_DIR} ${APR_UTIL_INCLUDE_DIR})
+target_link_libraries(log4cxx PRIVATE ${APR_LIBRARIES} ${APR_UTIL_LIBRARIES})
+if(WIN32)
+# The ODBC appender is always enabled in the Windows configuration
+target_link_libraries(log4cxx PRIVATE odbc32.lib)
+option(LOG4CXX_INSTALL_PDB "Install .pdb files (if generated)" ON)
+endif()
+
+if(TEST_LOG4CXX)
+ add_subdirectory(test)
+endif()
diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt
new file mode 100644
index 0000000..12cb4c9
--- /dev/null
+++ b/src/main/CMakeLists.txt
@@ -0,0 +1,9 @@
+add_subdirectory(include)
+add_subdirectory(cpp)
+
+# setup include directories
+include(GNUInstallDirs)
+target_include_directories(log4cxx PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+)
diff --git a/src/main/cpp/CMakeLists.txt b/src/main/cpp/CMakeLists.txt
new file mode 100644
index 0000000..3571cf5
--- /dev/null
+++ b/src/main/cpp/CMakeLists.txt
@@ -0,0 +1,165 @@
+
+# Options
+option(LOG4CXX_BLOCKING_ASYNC_APPENDER "Async appender behaviour" ON)
+option(BUILD_SHARED_LIBS "Build shared libraries" ON)
+
+# Build the log4cxx library
+add_library(log4cxx action.cpp)
+if(BUILD_SHARED_LIBS)
+ target_compile_definitions(log4cxx PRIVATE LOG4CXX)
+else()
+ target_compile_definitions(log4cxx PUBLIC LOG4CXX_STATIC)
+endif()
+add_dependencies(log4cxx configure_log4cxx)
+target_sources(log4cxx
+ PRIVATE
+ andfilter.cpp
+ appenderattachableimpl.cpp
+ appenderskeleton.cpp
+ aprinitializer.cpp
+ $<IF:$<BOOL:LOG4CXX_BLOCKING_ASYNC_APPENDER>,asyncappender.cpp,asyncappender_nonblocking.cpp>
+ basicconfigurator.cpp
+ bufferedwriter.cpp
+ bytearrayinputstream.cpp
+ bytearrayoutputstream.cpp
+ bytebuffer.cpp
+ cacheddateformat.cpp
+ charsetdecoder.cpp
+ charsetencoder.cpp
+ class.cpp
+ classnamepatternconverter.cpp
+ classregistration.cpp
+ condition.cpp
+ configurator.cpp
+ consoleappender.cpp
+ cyclicbuffer.cpp
+ dailyrollingfileappender.cpp
+ datagrampacket.cpp
+ datagramsocket.cpp
+ date.cpp
+ dateformat.cpp
+ datelayout.cpp
+ datepatternconverter.cpp
+ defaultconfigurator.cpp
+ defaultloggerfactory.cpp
+ defaultrepositoryselector.cpp
+ domconfigurator.cpp
+ exception.cpp
+ fallbackerrorhandler.cpp
+ file.cpp
+ fileappender.cpp
+ filedatepatternconverter.cpp
+ fileinputstream.cpp
+ filelocationpatternconverter.cpp
+ fileoutputstream.cpp
+ filerenameaction.cpp
+ filewatchdog.cpp
+ filter.cpp
+ filterbasedtriggeringpolicy.cpp
+ fixedwindowrollingpolicy.cpp
+ formattinginfo.cpp
+ fulllocationpatternconverter.cpp
+ gzcompressaction.cpp
+ hierarchy.cpp
+ htmllayout.cpp
+ inetaddress.cpp
+ inputstream.cpp
+ inputstreamreader.cpp
+ integer.cpp
+ integerpatternconverter.cpp
+ layout.cpp
+ level.cpp
+ levelmatchfilter.cpp
+ levelpatternconverter.cpp
+ levelrangefilter.cpp
+ linelocationpatternconverter.cpp
+ lineseparatorpatternconverter.cpp
+ literalpatternconverter.cpp
+ loader.cpp
+ locale.cpp
+ locationinfo.cpp
+ logger.cpp
+ loggermatchfilter.cpp
+ loggerpatternconverter.cpp
+ loggingevent.cpp
+ loggingeventpatternconverter.cpp
+ loglog.cpp
+ logmanager.cpp
+ logstream.cpp
+ manualtriggeringpolicy.cpp
+ mdc.cpp
+ messagebuffer.cpp
+ messagepatternconverter.cpp
+ methodlocationpatternconverter.cpp
+ mutex.cpp
+ nameabbreviator.cpp
+ namepatternconverter.cpp
+ ndc.cpp
+ ndcpatternconverter.cpp
+ nteventlogappender.cpp
+ objectimpl.cpp
+ objectoutputstream.cpp
+ objectptr.cpp
+ obsoleterollingfileappender.cpp
+ odbcappender.cpp
+ onlyonceerrorhandler.cpp
+ optionconverter.cpp
+ outputdebugstringappender.cpp
+ outputstream.cpp
+ outputstreamwriter.cpp
+ patternconverter.cpp
+ patternlayout.cpp
+ patternparser.cpp
+ pool.cpp
+ properties.cpp
+ propertiespatternconverter.cpp
+ propertyconfigurator.cpp
+ propertyresourcebundle.cpp
+ propertysetter.cpp
+ reader.cpp
+ relativetimedateformat.cpp
+ relativetimepatternconverter.cpp
+ resourcebundle.cpp
+ rollingfileappender.cpp
+ rollingpolicy.cpp
+ rollingpolicybase.cpp
+ rolloverdescription.cpp
+ rootlogger.cpp
+ serversocket.cpp
+ simpledateformat.cpp
+ simplelayout.cpp
+ sizebasedtriggeringpolicy.cpp
+ smtpappender.cpp
+ socket.cpp
+ socketappender.cpp
+ socketappenderskeleton.cpp
+ sockethubappender.cpp
+ socketoutputstream.cpp
+ strftimedateformat.cpp
+ stringhelper.cpp
+ stringmatchfilter.cpp
+ stringtokenizer.cpp
+ synchronized.cpp
+ syslogappender.cpp
+ syslogwriter.cpp
+ system.cpp
+ systemerrwriter.cpp
+ systemoutwriter.cpp
+ telnetappender.cpp
+ threadcxx.cpp
+ threadlocal.cpp
+ threadpatternconverter.cpp
+ threadspecificdata.cpp
+ throwableinformationpatternconverter.cpp
+ timebasedrollingpolicy.cpp
+ timezone.cpp
+ transcoder.cpp
+ transform.cpp
+ triggeringpolicy.cpp
+ ttcclayout.cpp
+ writer.cpp
+ writerappender.cpp
+ xmllayout.cpp
+ xmlsocketappender.cpp
+ zipcompressaction.cpp
+)
diff --git a/src/main/include/CMakeLists.txt b/src/main/include/CMakeLists.txt
new file mode 100644
index 0000000..680101d
--- /dev/null
+++ b/src/main/include/CMakeLists.txt
@@ -0,0 +1,97 @@
+# Configure
+if(WIN32)
+add_custom_target(configure_log4cxx
+ COMMAND "${CMAKE_COMMAND}" -E copy_if_different
+ ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/log4cxx.hw
+ ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/log4cxx.h
+ COMMAND "${CMAKE_COMMAND}" -E copy_if_different
+ ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/private/log4cxx_private.hw
+ ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/private/log4cxx_private.h
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/log4cxx.hw
+ ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/private/log4cxx_private.hw
+ BYPRODUCTS
+ ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/log4cxx.h
+ ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/private/log4cxx_private.h
+)
+else()
+# Configure log4cxx.h
+set(LOG4CXX_CHAR "utf-8" CACHE STRING "Interal 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 0)
+if(${LOG4CXX_CHAR} STREQUAL "unichar")
+ set(LOGCHAR_IS_UNICHAR 1)
+elseif(${LOG4CXX_CHAR} STREQUAL "wchar_t")
+ set(LOGCHAR_IS_WCHAR 1)
+else()
+ set(LOGCHAR_IS_UTF8 1)
+endif()
+option(LOG4CXX_WCHAR_T "Enable wchar_t API methods" ON)
+option(LOG4CXX_UNICHAR "Enable UniChar API methods" OFF)
+if(APPLE)
+option(LOG4CXX_CFSTRING "Enable CFString API methods, requires Mac OS/X CoreFoundation" OFF)
+endif()
+set(CHAR_API 1)
+foreach(varName WCHAR_T UNICHAR CFSTRING )
+ if(${LOG4CXX_${varName}})
+ set("${varName}_API" 1)
+ else()
+ set("${varName}_API" 0)
+ endif()
+endforeach()
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/log4cxx.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/log4cxx.h
+ @ONLY
+)
+
+# Configure log4cxx_private.h
+set(LOG4CXX_CHARSET "locale" CACHE STRING "LogString characters, choice of locale (default), utf-8, ISO-8859-1, US-ASCII, EBCDIC")
+set_property(CACHE LOG4CXX_CHARSET PROPERTY STRINGS "locale" "utf-8" "ISO-8859-1" "US-ASCII" "EBCDIC")
+set(CHARSET_EBCDIC 0)
+set(CHARSET_USASCII 0)
+set(CHARSET_ISO88591 0)
+set(CHARSET_UTF8 0)
+if(${LOG4CXX_CHARSET} STREQUAL "EBCDIC")
+ set(CHARSET_EBCDIC 1)
+elseif(${LOG4CXX_CHARSET} STREQUAL "US-ASCII")
+ set(CHARSET_USASCII 1)
+elseif(${LOG4CXX_CHARSET} STREQUAL "ISO-8859-1")
+ set(CHARSET_ISO88591 1)
+elseif(${LOG4CXX_CHARSET} STREQUAL "utf-8")
+ set(CHARSET_UTF8 1)
+endif()
+
+option(LOG4CXX_HAS_STD_LOCALE "Is the standard locale header available?" OFF)
+option(LOG4CXX_HAS_ODBC "Build with ODBC appender?" OFF)
+option(LOG4CXX_HAS_MBSRTOWCS "Default character encoder converts multi-byte string to LogString using mbstowcs()?" OFF)
+option(LOG4CXX_HAS_WCSTOMBS "Default wide character encoder converts using wcstombs()?" OFF)
+option(LOG4CXX_HAS_FWIDE "Is the fwide(fd) function available?" OFF)
+option(LOG4CXX_HAS_LIBESMTP "Use libESMTP in SMTPAppender?" OFF)
+option(LOG4CXX_HAS_SYSLOG "Is the syslog function available?" OFF)
+
+foreach(varName HAS_STD_LOCALE HAS_ODBC HAS_MBSRTOWCS HAS_WCSTOMBS HAS_FWIDE HAS_LIBESMTP HAS_SYSLOG)
+ if(${LOG4CXX_${varName}})
+ set(${varName} 1)
+ else()
+ set(${varName} 0)
+ endif()
+endforeach()
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/private/log4cxx_private.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/private/log4cxx_private.h
+ @ONLY
+)
+
+# Provide the dependencies
+add_custom_target(configure_log4cxx
+ COMMAND "${CMAKE_COMMAND}" -E echo "Checking configuration"
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/log4cxx/log4cxx.h.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/log4cxx/private/log4cxx_private.h.in
+ BYPRODUCTS
+ ${CMAKE_CURRENT_BINARY_DIR}/include/log4cxx/log4cxx.h
+ ${CMAKE_CURRENT_BINARY_DIR}/include/log4cxx/private/log4cxx_private.h
+)
+endif()
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
new file mode 100644
index 0000000..da8ed95
--- /dev/null
+++ b/src/test/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(cpp)
\ No newline at end of file
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
new file mode 100644
index 0000000..ad3665f
--- /dev/null
+++ b/src/test/cpp/CMakeLists.txt
@@ -0,0 +1,63 @@
+# Components required by all tests
+add_library(testingFramework STATIC abts.cpp appenderskeletontestcase.cpp logunit.cpp vectorappender.cpp writerappendertestcase.cpp )
+target_include_directories(testingFramework PRIVATE ${CMAKE_CURRENT_LIST_DIR} $<TARGET_PROPERTY:log4cxx,INCLUDE_DIRECTORIES>)
+add_subdirectory(util)
+target_sources(testingUtilities PRIVATE xml/xlevel.cpp)
+
+# Tests defined in this directory
+set(ALL_LOG4CXX_TESTS
+ asyncappendertestcase
+ consoleappendertestcase
+ decodingtest
+ encodingtest
+ fileappendertest
+ filetestcase
+ hierarchytest
+ hierarchythresholdtestcase
+ l7dtestcase
+ leveltestcase
+ loggertestcase
+ mdctestcase
+ minimumtestcase
+ ndctestcase
+ patternlayouttest
+ propertyconfiguratortest
+ rollingfileappendertestcase
+ streamtestcase
+)
+foreach(fileName IN LISTS ALL_LOG4CXX_TESTS)
+ add_executable(${fileName} "${fileName}.cpp")
+endforeach()
+target_sources(rollingfileappendertestcase PRIVATE fileappendertestcase.cpp)
+
+# Tests defined in subdirectories
+add_subdirectory(helpers)
+add_subdirectory(customlogger)
+if(LOG4CXX_HAS_ODBC OR WIN32)
+ add_subdirectory(db)
+endif()
+add_subdirectory(defaultinit)
+add_subdirectory(filter)
+add_subdirectory(net)
+if(WIN32)
+ add_subdirectory(nt)
+endif()
+add_subdirectory(pattern)
+add_subdirectory(rolling)
+add_subdirectory(spi)
+add_subdirectory(varia)
+add_subdirectory(xml)
+
+foreach(testName IN LISTS ALL_LOG4CXX_TESTS)
+ target_include_directories(${testName} PRIVATE ${CMAKE_CURRENT_LIST_DIR} $<TARGET_PROPERTY:log4cxx,INCLUDE_DIRECTORIES>)
+ target_link_libraries(${testName} PRIVATE log4cxx testingFramework testingUtilities ${APR_LIBRARIES})
+ add_test(NAME ${testName}
+ COMMAND ${testName} -v
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../resources
+ )
+ if(WIN32)
+ set_tests_properties(${testName} PROPERTIES ENVIRONMENT
+ "PATH=$<SHELL_PATH:$<TARGET_FILE_DIR:log4cxx>>$<SEMICOLON>$ENV{PATH}"
+ )
+ endif()
+endforeach()
diff --git a/src/test/cpp/customlogger/CMakeLists.txt b/src/test/cpp/customlogger/CMakeLists.txt
new file mode 100644
index 0000000..76f02d6
--- /dev/null
+++ b/src/test/cpp/customlogger/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(xloggertestcase xloggertestcase.cpp xlogger.cpp)
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} xloggertestcase PARENT_SCOPE)
diff --git a/src/test/cpp/db/CMakeLists.txt b/src/test/cpp/db/CMakeLists.txt
new file mode 100644
index 0000000..3f34418
--- /dev/null
+++ b/src/test/cpp/db/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_executable(odbcappendertestcase odbcappendertestcase.cpp)
+target_include_directories(odbcappendertestcase PRIVATE ${CMAKE_CURRENT_LIST_DIR} $<TARGET_PROPERTY:log4cxx,INCLUDE_DIRECTORIES>)
+target_link_libraries(odbcappendertestcase log4cxx testingFramework testingUtilities ${APR_LIBRARIES})
diff --git a/src/test/cpp/defaultinit/CMakeLists.txt b/src/test/cpp/defaultinit/CMakeLists.txt
new file mode 100644
index 0000000..a9d2ee8
--- /dev/null
+++ b/src/test/cpp/defaultinit/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(defaultinittestcase testcase1.cpp testcase2.cpp testcase3.cpp testcase4.cpp)
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} defaultinittestcase PARENT_SCOPE)
diff --git a/src/test/cpp/filter/CMakeLists.txt b/src/test/cpp/filter/CMakeLists.txt
new file mode 100644
index 0000000..83dc498
--- /dev/null
+++ b/src/test/cpp/filter/CMakeLists.txt
@@ -0,0 +1,9 @@
+add_executable(filtertests
+ andfiltertest.cpp
+ denyallfiltertest.cpp
+ levelmatchfiltertest.cpp
+ levelrangefiltertest.cpp
+ loggermatchfiltertest.cpp
+ stringmatchfiltertest.cpp
+)
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} filtertests PARENT_SCOPE)
diff --git a/src/test/cpp/helpers/CMakeLists.txt b/src/test/cpp/helpers/CMakeLists.txt
new file mode 100644
index 0000000..bb27546
--- /dev/null
+++ b/src/test/cpp/helpers/CMakeLists.txt
@@ -0,0 +1,28 @@
+set(HELPER_TESTS
+ absolutetimedateformattestcase
+ cacheddateformattestcase
+ charsetdecodertestcase
+ charsetencodertestcase
+ cyclicbuffertestcase
+ datetimedateformattestcase
+ filewatchdogtest
+ inetaddresstestcase
+ iso8601dateformattestcase
+ messagebuffertest
+ optionconvertertestcase
+ propertiestestcase
+ relativetimedateformattestcase
+ stringhelpertestcase
+ stringtokenizertestcase
+ syslogwritertest
+ threadtestcase
+ timezonetestcase
+ transcodertestcase
+)
+foreach(fileName IN LISTS HELPER_TESTS)
+ add_executable(${fileName} "${fileName}.cpp")
+ target_include_directories(${fileName} PRIVATE ${CMAKE_CURRENT_LIST_DIR} $<TARGET_PROPERTY:log4cxx,INCLUDE_DIRECTORIES> ${APR_INCLUDE_DIR})
+endforeach()
+target_sources(cacheddateformattestcase PRIVATE localechanger.cpp)
+target_sources(datetimedateformattestcase PRIVATE localechanger.cpp)
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} ${HELPER_TESTS} PARENT_SCOPE)
diff --git a/src/test/cpp/net/CMakeLists.txt b/src/test/cpp/net/CMakeLists.txt
new file mode 100644
index 0000000..6bc5847
--- /dev/null
+++ b/src/test/cpp/net/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+# Tests defined in this directory
+set(NET_TESTS
+ smtpappendertestcase
+ socketappendertestcase
+ sockethubappendertestcase
+ socketservertestcase
+ syslogappendertestcase
+ telnetappendertestcase
+ xmlsocketappendertestcase
+)
+foreach(fileName IN LISTS NET_TESTS)
+ add_executable(${fileName} "${fileName}.cpp")
+endforeach()
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} ${NET_TESTS} PARENT_SCOPE)
diff --git a/src/test/cpp/nt/CMakeLists.txt b/src/test/cpp/nt/CMakeLists.txt
new file mode 100644
index 0000000..0b8a825
--- /dev/null
+++ b/src/test/cpp/nt/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(eventlogtests nteventlogappendertestcase.cpp)
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} eventlogtests PARENT_SCOPE)
diff --git a/src/test/cpp/pattern/CMakeLists.txt b/src/test/cpp/pattern/CMakeLists.txt
new file mode 100644
index 0000000..cd00697
--- /dev/null
+++ b/src/test/cpp/pattern/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(patternparsertestcase patternparsertestcase.cpp num343patternconverter.cpp)
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} patternparsertestcase PARENT_SCOPE)
diff --git a/src/test/cpp/rolling/CMakeLists.txt b/src/test/cpp/rolling/CMakeLists.txt
new file mode 100644
index 0000000..2b2c650
--- /dev/null
+++ b/src/test/cpp/rolling/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Tests defined in this directory
+set(ROLLING_TESTS
+ filenamepatterntestcase
+ filterbasedrollingtest
+ manualrollingtest
+ obsoletedailyrollingfileappendertest
+ obsoleterollingfileappendertest
+ sizebasedrollingtest
+ timebasedrollingtest
+)
+foreach(fileName IN LISTS ROLLING_TESTS)
+ add_executable(${fileName} "${fileName}.cpp")
+endforeach()
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} ${ROLLING_TESTS} PARENT_SCOPE)
diff --git a/src/test/cpp/spi/CMakeLists.txt b/src/test/cpp/spi/CMakeLists.txt
new file mode 100644
index 0000000..380269f
--- /dev/null
+++ b/src/test/cpp/spi/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(spitestcase loggingeventtest.cpp)
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} spitestcase PARENT_SCOPE)
diff --git a/src/test/cpp/util/CMakeLists.txt b/src/test/cpp/util/CMakeLists.txt
new file mode 100644
index 0000000..dd25dd7
--- /dev/null
+++ b/src/test/cpp/util/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Components required by all tests
+add_library(testingUtilities STATIC
+ serializationtesthelper.cpp
+ absolutedateandtimefilter.cpp
+ absolutetimefilter.cpp
+ binarycompare.cpp
+ compare.cpp
+ controlfilter.cpp
+ filenamefilter.cpp
+ iso8601filter.cpp
+ linenumberfilter.cpp
+ relativetimefilter.cpp
+ threadfilter.cpp
+ transformer.cpp
+ utilfilter.cpp
+ xmlfilenamefilter.cpp
+ xmllineattributefilter.cpp
+ xmlthreadfilter.cpp
+ xmltimestampfilter.cpp
+)
+target_include_directories(testingUtilities PRIVATE ${CMAKE_CURRENT_LIST_DIR} $<TARGET_PROPERTY:log4cxx,INCLUDE_DIRECTORIES>)
diff --git a/src/test/cpp/varia/CMakeLists.txt b/src/test/cpp/varia/CMakeLists.txt
new file mode 100644
index 0000000..aeaeeb4
--- /dev/null
+++ b/src/test/cpp/varia/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Tests defined in this directory
+set(VARIA_TESTS
+ errorhandlertestcase
+ levelmatchfiltertestcase
+ levelrangefiltertestcase
+)
+foreach(fileName IN LISTS VARIA_TESTS)
+ add_executable(${fileName} "${fileName}.cpp")
+endforeach()
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} ${VARIA_TESTS} PARENT_SCOPE)
diff --git a/src/test/cpp/xml/CMakeLists.txt b/src/test/cpp/xml/CMakeLists.txt
new file mode 100644
index 0000000..cd8bcf5
--- /dev/null
+++ b/src/test/cpp/xml/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_executable(xmltests
+ domtestcase
+ xmllayouttest
+ xmllayouttestcase
+)
+target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES})
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} xmltests PARENT_SCOPE)
[logging-log4cxx] 25/49: Remove unused files
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit b3bec51bc5946047b3154a445ef8a78520e75e22
Merge: dc7dc14 48c597b
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Sat Feb 1 10:25:07 2020 +1100
Remove unused files
.editorconfig | 19 +
CMakeLists.txt | 4 +-
autogen.sh | 4 +-
configure.bat | 8 +-
release_perform.sh | 15 +-
release_prepare.sh | 4 +-
release_purge.sh | 6 +-
src/changes/changes.xml | 1 +
.../{findAPR-Util.cmake => FindAPR-Util.cmake} | 0
src/cmake/{findAPR.cmake => FindAPR.cmake} | 0
src/main/cpp/CMakeLists.txt | 1 +
src/main/cpp/Makefile.am | 1 +
src/main/cpp/jsonlayout.cpp | 389 +++++++++++++++++
src/main/include/log4cxx/Makefile.am | 1 +
src/main/include/log4cxx/jsonlayout.h | 139 ++++++
src/test/cpp/CMakeLists.txt | 1 +
src/test/cpp/Makefile.am | 1 +
src/test/cpp/jsonlayouttest.cpp | 481 +++++++++++++++++++++
18 files changed, 1055 insertions(+), 20 deletions(-)
[logging-log4cxx] 49/49: Make the file render properly.
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit e2c35330e3847be75ac00a58ca12b551a56bf042
Author: Thorsten Schöning <ts...@am-soft.de>
AuthorDate: Sun Feb 9 21:19:22 2020 +0100
Make the file render properly.
---
src/site/apt/building/vcpkg.apt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/site/apt/building/vcpkg.apt b/src/site/apt/building/vcpkg.apt
index e7eff5f..4c3bdec 100644
--- a/src/site/apt/building/vcpkg.apt
+++ b/src/site/apt/building/vcpkg.apt
@@ -28,7 +28,7 @@ Building Apache log4cxx with vcpkg
PS> .\bootstrap-vcpkg.bat
Linux:~/$ ./bootstrap-vcpkg.sh
-
+
Then, to hook up user-wide integration, run (note: requires admin on first use)
PS> .\vcpkg integrate install
@@ -37,5 +37,7 @@ Building Apache log4cxx with vcpkg
*Building log4cxx.dll
++----+
PS> .\vcpkg install log4cxx
Linux:~/$ ./vcpkg install log4cxx
++----+
[logging-log4cxx] 02/49: Add support for building and testing with
cmake
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 774ea164c22657fe7d8b2f7e4bce450426a613e2
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Mon Oct 7 13:24:24 2019 +1100
Add support for building and testing with cmake
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5286f30..75a907e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,7 +39,7 @@ install(TARGETS log4cxx EXPORT log4cxxTargets
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
IF(LOG4CXX_INSTALL_PDB)
- INSTALL(FILES log4cxx.pdb
+ INSTALL(FILES $<TARGET_PDB_FILE:log4cxx>
DESTINATION ${CMAKE_INSTALL_BINDIR}
CONFIGURATIONS RelWithDebInfo Debug
)
[logging-log4cxx] 09/49: Set release date to today.
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 5b5ec139cd42c9ff402c11a9481ead314fb8584c
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Jan 31 14:19:29 2020 +1100
Set release date to today.
---
src/changes/changes.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 92d8b47..5f2bf71 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -24,7 +24,7 @@
<body>
<release version="0.11.0"
- date="XXXX-XX-XX"
+ date="2020-01-31"
description="Maintenance release.">
<action issue="LOGCXX-506" type="fix">CachedDateFormat reuses timestamps without updating milliseconds after formatting timestamp with ms == 654</action>
<action issue="LOGCXX-503" type="update">Checksums/Signatures don't match for log4cxx binaries</action>
[logging-log4cxx] 33/49: Revert "Fix failing defaultinittestcase"
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 06875bd4164700df875576b7e1b4be10c5435804
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Mon Feb 3 13:51:26 2020 +1100
Revert "Fix failing defaultinittestcase"
This reverts commit d08e392e9a354cd2f2c58c7ec0e81df521812de8.
---
src/test/cpp/CMakeLists.txt | 2 +-
src/test/cpp/defaultinit/CMakeLists.txt | 5 ++---
src/test/cpp/defaultinit/testcase1.cpp | 2 +-
src/test/cpp/defaultinit/testcase2.cpp | 4 +---
src/test/cpp/defaultinit/testcase3.cpp | 4 +---
src/test/cpp/defaultinit/testcase4.cpp | 4 +---
6 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index 9d7b0e3..cc5d250 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -53,7 +53,7 @@ foreach(testName IN LISTS ALL_LOG4CXX_TESTS)
target_include_directories(${testName} PRIVATE ${CMAKE_CURRENT_LIST_DIR} $<TARGET_PROPERTY:log4cxx,INCLUDE_DIRECTORIES>)
target_link_libraries(${testName} PRIVATE testingFramework testingUtilities log4cxx ${APR_LIBRARIES})
add_test(NAME ${testName}
- COMMAND ${testName} -v ${${testName}_command_args}
+ COMMAND ${testName} -v
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../resources
)
set_tests_properties(${testName} PROPERTIES
diff --git a/src/test/cpp/defaultinit/CMakeLists.txt b/src/test/cpp/defaultinit/CMakeLists.txt
index 45d8dce..a9d2ee8 100644
--- a/src/test/cpp/defaultinit/CMakeLists.txt
+++ b/src/test/cpp/defaultinit/CMakeLists.txt
@@ -1,3 +1,2 @@
-add_executable(uninitializedtestcase testcase1.cpp)
-add_executable(defaultinittestcase testcase2.cpp testcase3.cpp testcase4.cpp)
-set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} uninitializedtestcase defaultinittestcase PARENT_SCOPE)
+add_executable(defaultinittestcase testcase1.cpp testcase2.cpp testcase3.cpp testcase4.cpp)
+set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} defaultinittestcase PARENT_SCOPE)
diff --git a/src/test/cpp/defaultinit/testcase1.cpp b/src/test/cpp/defaultinit/testcase1.cpp
index b0059a4..9d60bb5 100644
--- a/src/test/cpp/defaultinit/testcase1.cpp
+++ b/src/test/cpp/defaultinit/testcase1.cpp
@@ -48,5 +48,5 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION(TestCase1)
+LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase1)
diff --git a/src/test/cpp/defaultinit/testcase2.cpp b/src/test/cpp/defaultinit/testcase2.cpp
index df1d236..13c755d 100644
--- a/src/test/cpp/defaultinit/testcase2.cpp
+++ b/src/test/cpp/defaultinit/testcase2.cpp
@@ -23,7 +23,6 @@
#include <log4cxx/logger.h>
#include "../insertwide.h"
#include "../logunit.h"
-#include <log4cxx/xml/domconfigurator.h>
using namespace log4cxx;
@@ -36,7 +35,6 @@ LOGUNIT_CLASS(TestCase2)
public:
void setUp()
{
- log4cxx::xml::DOMConfigurator::configure("input/xml/defaultInit.xml");
}
void tearDown()
@@ -58,6 +56,6 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION(TestCase2)
+LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase2)
diff --git a/src/test/cpp/defaultinit/testcase3.cpp b/src/test/cpp/defaultinit/testcase3.cpp
index da9471d..37e0761 100644
--- a/src/test/cpp/defaultinit/testcase3.cpp
+++ b/src/test/cpp/defaultinit/testcase3.cpp
@@ -16,7 +16,6 @@
*/
#include <log4cxx/logmanager.h>
-#include <log4cxx/propertyconfigurator.h>
#include <log4cxx/logger.h>
#include "../insertwide.h"
#include "../logunit.h"
@@ -32,7 +31,6 @@ LOGUNIT_CLASS(TestCase3)
public:
void setUp()
{
- PropertyConfigurator::configure(LOG4CXX_FILE("input/defaultInit3.properties"));
}
void tearDown()
@@ -54,4 +52,4 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION(TestCase3)
+LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase3)
diff --git a/src/test/cpp/defaultinit/testcase4.cpp b/src/test/cpp/defaultinit/testcase4.cpp
index 1ff3a2e..64bc06e 100644
--- a/src/test/cpp/defaultinit/testcase4.cpp
+++ b/src/test/cpp/defaultinit/testcase4.cpp
@@ -21,7 +21,6 @@
#include <log4cxx/logmanager.h>
#include <log4cxx/logger.h>
-#include <log4cxx/xml/domconfigurator.h>
#include "../insertwide.h"
#include "../logunit.h"
@@ -36,7 +35,6 @@ LOGUNIT_CLASS(TestCase4)
public:
void setUp()
{
- log4cxx::xml::DOMConfigurator::configure("input/xml/defaultInit.xml");
}
void tearDown()
@@ -59,5 +57,5 @@ public:
};
-LOGUNIT_TEST_SUITE_REGISTRATION(TestCase4)
+LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TestCase4)
[logging-log4cxx] 47/49: Make the file render properly.
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit c36fea0f856447ace10a8f8d4f2e8902860ffb0b
Author: Thorsten Schöning <ts...@am-soft.de>
AuthorDate: Sun Feb 9 21:17:47 2020 +0100
Make the file render properly.
---
src/site/apt/building/cmake.apt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/site/apt/building/cmake.apt b/src/site/apt/building/cmake.apt
index d76afc9..3585ea8 100644
--- a/src/site/apt/building/cmake.apt
+++ b/src/site/apt/building/cmake.apt
@@ -18,6 +18,8 @@
------
------
+Building Apache log4cxx with CMake
+
* Quick start:
Building and testing log4cxx on a Unix platform with packaged APR and APR-Util.
@@ -28,7 +30,7 @@
+------------+
$ apt-get install build-essential libapr1-dev libaprutil1-dev gzip zip
$ cd apache-log4cxx-x.x.x
-$ mkdir build
+$ mkdir build
$ cd build
$ ccmake ..
$ make
@@ -36,6 +38,7 @@ $ sudo make install
+------------+
* ccmake options
+
*------------------------+---------------------------------------------------------------------------------------------+
| -DLOG4CXX_WCHAR_T=no | Enable wchar_t API methods, choice of yes (default), no. |
*------------------------+---------------------------------------------------------------------------------------------+
[logging-log4cxx] 38/49: Change to cmake-maven-plugin that works on
Windows
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit ac9050466766853f6fe7512762ccfcdf1524b369
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Feb 7 15:27:30 2020 +1100
Change to cmake-maven-plugin that works on Windows
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index c0afaa2..b520f3f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,7 +65,7 @@
<connection>scm:git:http://gitbox.apache.org/repos/asf/logging-log4cxx.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/logging-log4cxx.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=logging-log4cxx.git</url>
- <tag>v0.11.0-RC1</tag>
+ <tag>HEAD</tag>
</scm>
<properties>
@@ -183,7 +183,7 @@
<plugin>
<groupId>com.googlecode.cmake-maven-project</groupId>
<artifactId>cmake-maven-plugin</artifactId>
- <version>3.14.5-b1</version>
+ <version>3.16.3-b1</version>
<executions>
<execution>
<id>cmake-generate</id>
[logging-log4cxx] 05/49: Disable building tests by default to
conform with vcpkg guidelines
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 80a9fdbe6ea276529ce1abd1e470f86350b4bdf0
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Sun Oct 13 17:24:01 2019 +1100
Disable building tests by default to conform with vcpkg guidelines
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index acd270a..b28b810 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@ find_path(APR_UTIL_INCLUDE_DIR apu.h PATH_SUFFIXES apr-1)
find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1 aprutil-1)
## Testing
-option(TEST_LOG4CXX "Build log4cxx tests" ON)
+option(TEST_LOG4CXX "Build log4cxx tests" OFF)
if(TEST_LOG4CXX)
enable_testing()
endif()
[logging-log4cxx] 40/49: Allow maven to be used with generators
that need to be told which configuration to test
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit d0c6cae2e4ede3cc6530f4b5ac8f80732a6b08fc
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Feb 7 17:13:02 2020 +1100
Allow maven to be used with generators that need to be told which configuration to test
---
pom.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pom.xml b/pom.xml
index b520f3f..60ce98a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -224,6 +224,7 @@
<buildDirectory>${project.build.directory}/${platform}</buildDirectory>
<testFailureIgnore>true</testFailureIgnore>
<ctest.skip.tests>${maven.test.skip}</ctest.skip.tests>
+ <config>${cmake.config}</config>
</configuration>
</execution>
</executions>
@@ -465,6 +466,7 @@
<platform>mac-x86_64</platform>
<build.type>debug</build.type>
<cmake.classifier>mac-x86_64</cmake.classifier>
+ <cmake.config>${build.type}</cmake.config>
</properties>
</profile>
<profile>
@@ -479,6 +481,7 @@
<platform>mac-x86_64</platform>
<build.type>release</build.type>
<cmake.classifier>mac-x86_64</cmake.classifier>
+ <cmake.config>${build.type}</cmake.config>
</properties>
</profile>
</profiles>
[logging-log4cxx] 11/49: Set the letter case of find modules to
that required by case sensitive filesystems
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit e5f8af15fae93d9c547549c12639edf5f186d386
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Jan 31 17:16:52 2020 +1100
Set the letter case of find modules to that required by case sensitive filesystems
[logging-log4cxx] 18/49: Add JSON appender and test
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit c3146a535d073616d686f72b9d5ef2f678447755
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Jan 31 17:59:52 2020 +1100
Add JSON appender and test
---
src/main/cpp/CMakeLists.txt | 1 +
src/test/cpp/CMakeLists.txt | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/main/cpp/CMakeLists.txt b/src/main/cpp/CMakeLists.txt
index 3571cf5..cdf3034 100644
--- a/src/main/cpp/CMakeLists.txt
+++ b/src/main/cpp/CMakeLists.txt
@@ -67,6 +67,7 @@ target_sources(log4cxx
inputstreamreader.cpp
integer.cpp
integerpatternconverter.cpp
+ jsonlayout.cpp
layout.cpp
level.cpp
levelmatchfilter.cpp
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index 7a0ada9..793a30b 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -14,6 +14,7 @@ set(ALL_LOG4CXX_TESTS
filetestcase
hierarchytest
hierarchythresholdtestcase
+ jsonlayouttest
l7dtestcase
leveltestcase
loggertestcase
[logging-log4cxx] 13/49: Set the letter case of find modules to
that required by case sensitive filesystems
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 6c1e0b6dd0511fb726a50cd55139f67878f48234
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Jan 31 17:16:52 2020 +1100
Set the letter case of find modules to that required by case sensitive filesystems
[logging-log4cxx] 48/49: Enhance support for paths with spaces by
simply using a different divider character.
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit bb9ab5f28d5e92aad945c98a8d72136773546d48
Author: Thorsten Schöning <ts...@am-soft.de>
AuthorDate: Sun Feb 9 21:18:15 2020 +0100
Enhance support for paths with spaces by simply using a different divider character.
---
src/test/cpp/net/socketserverstarter.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/test/cpp/net/socketserverstarter.cpp b/src/test/cpp/net/socketserverstarter.cpp
index 43e9d56..59ac0f8 100644
--- a/src/test/cpp/net/socketserverstarter.cpp
+++ b/src/test/cpp/net/socketserverstarter.cpp
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,7 +32,7 @@ LOGUNIT_CLASS(SocketServerStarter)
LOGUNIT_TEST_SUITE(SocketServerStarter);
LOGUNIT_TEST(startServer);
LOGUNIT_TEST_SUITE_END();
-
+
public:
void setUp()
{
@@ -41,7 +41,7 @@ public:
void tearDown()
{
}
-
+
void startServer()
{
helpers::Pool p;
@@ -76,9 +76,9 @@ public:
for (; i < 14 && pcmd && *pcmd; ++i)
{
args[i] = pcmd;
- if (NULL != (pcmd = strchr(pcmd, ' ')))
+ if (NULL != (pcmd = strchr(pcmd, ';')))
{
- while(' ' == *pcmd)
+ while(';' == *pcmd)
{
*pcmd = 0;
++pcmd;
[logging-log4cxx] 06/49: Provide find modules for APR and APR-Util.
Add the version resource to log4cxx.dll
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit d919ea18d495d3f8cbdddb64db849c8fc67201de
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Tue Jan 28 14:36:37 2020 +1100
Provide find modules for APR and APR-Util. Add the version resource to log4cxx.dll
---
CMakeLists.txt | 13 +++++-----
src/CMakeLists.txt | 4 +--
src/cmake/findAPR-Util.cmake | 40 ++++++++++++++++++++++++++++++
src/cmake/findAPR.cmake | 39 +++++++++++++++++++++++++++++
src/cmake/projectVersionDetails.cmake | 5 ++++
src/main/CMakeLists.txt | 1 +
src/main/include/CMakeLists.txt | 4 +++
src/main/include/log4cxx/version_info.h.in | 5 ++++
src/main/resources/CMakeLists.txt | 7 ++++++
src/main/resources/log4cxx.rc | 9 ++++---
10 files changed, 114 insertions(+), 13 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b28b810..df334be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,10 @@
cmake_minimum_required(VERSION 3.13)
-project(log4cxx VERSION 0.10.0 LANGUAGES CXX)
+include(src/cmake/projectVersionDetails.cmake)
+project(log4cxx VERSION ${log4cxx_VER} LANGUAGES CXX)
+include(CTest)
+
+# FindAPR and FindAPR-util are not provided by APR and APR-Util so source them locally
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/src/cmake")
# Find Apache Runtime
find_package(apr QUIET)
@@ -13,12 +18,6 @@ find_package(apr-util QUIET)
find_path(APR_UTIL_INCLUDE_DIR apu.h PATH_SUFFIXES apr-1)
find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1 aprutil-1)
-## Testing
-option(TEST_LOG4CXX "Build log4cxx tests" OFF)
-if(TEST_LOG4CXX)
- enable_testing()
-endif()
-
# Building
add_subdirectory(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 95e66e1..fced9be 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,6 +7,6 @@ target_link_libraries(log4cxx PRIVATE odbc32.lib)
option(LOG4CXX_INSTALL_PDB "Install .pdb files (if generated)" ON)
endif()
-if(TEST_LOG4CXX)
- add_subdirectory(test)
+if(BUILD_TESTING)
+ add_subdirectory(test)
endif()
diff --git a/src/cmake/findAPR-Util.cmake b/src/cmake/findAPR-Util.cmake
new file mode 100644
index 0000000..3485911
--- /dev/null
+++ b/src/cmake/findAPR-Util.cmake
@@ -0,0 +1,40 @@
+# Locate APR-Util include paths and libraries
+include(FindPackageHandleStandardArgs)
+
+# This module defines
+# APR_UTIL_INCLUDE_DIR, where to find apr.h, etc.
+# APR_UTIL_LIBRARIES, the libraries to link against to use APR.
+# APR_UTIL_FOUND, set to yes if found
+
+macro(_apu_invoke _varname)
+ execute_process(
+ COMMAND ${APR_UTIL_CONFIG_EXECUTABLE} ${ARGN}
+ OUTPUT_VARIABLE _apr_output
+ RESULT_VARIABLE _apr_failed
+ )
+
+ if(_apr_failed)
+ message(FATAL_ERROR "apu-1-config ${ARGN} failed with result ${_apr_failed}")
+ else(_apr_failed)
+ string(REGEX REPLACE "[\r\n]" "" _apr_output "${_apr_output}")
+ string(REGEX REPLACE " +$" "" _apr_output "${_apr_output}")
+ string(REGEX REPLACE "^ +" "" _apr_output "${_apr_output}")
+
+ separate_arguments(_apr_output)
+
+ set(${_varname} "${_apr_output}")
+ endif(_apr_failed)
+endmacro(_apu_invoke)
+
+find_program(APR_UTIL_CONFIG_EXECUTABLE
+ apu-1-config
+ PATHS /usr/local/bin /usr/bin C:/Progra~1/apr-util/bin
+ )
+mark_as_advanced(APR_UTIL_CONFIG_EXECUTABLE)
+if(EXISTS ${APR_UTIL_CONFIG_EXECUTABLE})
+ _apu_invoke(APR_UTIL_INCLUDE_DIR --includedir)
+ _apu_invoke(APR_UTIL_LIBRARIES --link-ld)
+endif()
+
+find_package_handle_standard_args(apr-util DEFAULT_MSG
+ APR_UTIL_INCLUDE_DIR APR_UTIL_LIBRARIES)
diff --git a/src/cmake/findAPR.cmake b/src/cmake/findAPR.cmake
new file mode 100644
index 0000000..171d745
--- /dev/null
+++ b/src/cmake/findAPR.cmake
@@ -0,0 +1,39 @@
+# Locate APR include paths and libraries
+include(FindPackageHandleStandardArgs)
+
+# This module defines
+# APR_INCLUDE_DIR, where to find apr.h, etc.
+# APR_LIBRARIES, the libraries to link against to use APR.
+# APR_FOUND, set to 'yes' if found
+macro(_apr_invoke _varname)
+ execute_process(
+ COMMAND ${APR_CONFIG_EXECUTABLE} ${ARGN}
+ OUTPUT_VARIABLE _apr_output
+ RESULT_VARIABLE _apr_failed
+ )
+
+ if(_apr_failed)
+ message(FATAL_ERROR "apr-1-config ${ARGN} failed with result ${_apr_failed}")
+ else(_apr_failed)
+ string(REGEX REPLACE "[\r\n]" "" _apr_output "${_apr_output}")
+ string(REGEX REPLACE " +$" "" _apr_output "${_apr_output}")
+ string(REGEX REPLACE "^ +" "" _apr_output "${_apr_output}")
+
+ separate_arguments(_apr_output)
+ set(${_varname} "${_apr_output}")
+ endif(_apr_failed)
+endmacro(_apr_invoke)
+
+
+find_program(APR_CONFIG_EXECUTABLE
+ apr-1-config
+ PATHS /usr/local/bin /usr/bin C:/Progra~1/apr/bin
+ )
+mark_as_advanced(APR_CONFIG_EXECUTABLE)
+if(EXISTS ${APR_CONFIG_EXECUTABLE})
+ _apr_invoke(APR_INCLUDE_DIR --includedir)
+ _apr_invoke(APR_LIBRARIES --link-ld)
+endif()
+
+find_package_handle_standard_args(apr
+ APR_INCLUDE_DIR APR_LIBRARIES)
diff --git a/src/cmake/projectVersionDetails.cmake b/src/cmake/projectVersionDetails.cmake
new file mode 100644
index 0000000..68bda9b
--- /dev/null
+++ b/src/cmake/projectVersionDetails.cmake
@@ -0,0 +1,5 @@
+# This file should contain nothing but the following line
+# setting the project version. The variable name must not
+# clash with the log4cxx_VERSION* variables automatically
+# defined by the project() command.
+set(log4cxx_VER 0.11.0.0)
diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt
index 12cb4c9..80dd6d8 100644
--- a/src/main/CMakeLists.txt
+++ b/src/main/CMakeLists.txt
@@ -1,5 +1,6 @@
add_subdirectory(include)
add_subdirectory(cpp)
+add_subdirectory(resources)
# setup include directories
include(GNUInstallDirs)
diff --git a/src/main/include/CMakeLists.txt b/src/main/include/CMakeLists.txt
index 0afef45..1939886 100644
--- a/src/main/include/CMakeLists.txt
+++ b/src/main/include/CMakeLists.txt
@@ -14,6 +14,10 @@ add_custom_target(configure_log4cxx
${CMAKE_CURRENT_BINARY_DIR}/log4cxx/log4cxx.h
${CMAKE_CURRENT_BINARY_DIR}/log4cxx/private/log4cxx_private.h
)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/version_info.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/version_info.h
+ @ONLY
+)
else()
# Configure log4cxx.h
set(LOG4CXX_CHAR "utf-8" CACHE STRING "Interal character representation, choice of utf-8 (default), wchar_t, unichar")
diff --git a/src/main/include/log4cxx/version_info.h.in b/src/main/include/log4cxx/version_info.h.in
new file mode 100644
index 0000000..b4331fc
--- /dev/null
+++ b/src/main/include/log4cxx/version_info.h.in
@@ -0,0 +1,5 @@
+// Information used by resource files
+#define INFO_PRODUCT_VERSION_LIST @log4cxx_VERSION_MAJOR@,@log4cxx_VERSION_MINOR@,@log4cxx_VERSION_PATCH@
+#define INFO_PRODUCT_VERSION_STRING "@log4cxx_VERSION@"
+#define INFO_FILE_VERSION_LIST INFO_PRODUCT_VERSION_LIST,@log4cxx_VERSION_TWEAK@
+#define INFO_FILE_VERSION_STRING INFO_PRODUCT_VERSION_STRING "." @log4cxx_VERSION_TWEAK@
diff --git a/src/main/resources/CMakeLists.txt b/src/main/resources/CMakeLists.txt
new file mode 100644
index 0000000..3827357
--- /dev/null
+++ b/src/main/resources/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Configure
+if(WIN32)
+target_sources(log4cxx
+ PRIVATE
+ log4cxx.rc
+)
+endif()
\ No newline at end of file
diff --git a/src/main/resources/log4cxx.rc b/src/main/resources/log4cxx.rc
index d61b19c..3faf8b0 100644
--- a/src/main/resources/log4cxx.rc
+++ b/src/main/resources/log4cxx.rc
@@ -74,10 +74,11 @@ END
//
// Version
//
+#include <log4cxx/version_info.h>
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0, 0, 0, 0
- PRODUCTVERSION 0, 0, 0, 0
+ FILEVERSION INFO_FILE_VERSION_LIST
+ PRODUCTVERSION INFO_PRODUCT_VERSION_LIST
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -94,12 +95,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Apache Software Foundation"
VALUE "FileDescription", "Apache log4cxx"
- VALUE "FileVersion", "0, 0, 0, 0"
+ VALUE "FileVersion", INFO_FILE_VERSION_STRING
VALUE "InternalName", "log4cxx"
VALUE "LegalCopyright", "Licensed to the Apache Software Foundation (ASF) under one or more\ncontributor license agreements. See the NOTICE file distributed with\nthis work for additional information regarding copyright ownership.\nThe ASF licenses this file to You under the Apache License, Version 2.0\n(the ""License""); you may not use this file except in compliance with\nthe License. You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE- [...]
VALUE "OriginalFilename", "log4cxx.dll"
VALUE "ProductName", "Apache log4cxx"
- VALUE "ProductVersion", "0, 0, 0, 0"
+ VALUE "ProductVersion", INFO_PRODUCT_VERSION_STRING
END
END
BLOCK "VarFileInfo"
[logging-log4cxx] 31/49: Install a pkgconfig file on unix systems
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit f1331491386f42bb3673c62bd02e455048bd22cc
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Sun Feb 2 10:22:20 2020 +1100
Install a pkgconfig file on unix systems
---
CMakeLists.txt | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b37e6e4..0b46e1e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,12 +38,28 @@ install(TARGETS log4cxx EXPORT log4cxxTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
+
IF(WIN32 AND LOG4CXX_INSTALL_PDB)
INSTALL(FILES $<TARGET_PDB_FILE:log4cxx>
DESTINATION ${CMAKE_INSTALL_BINDIR}
CONFIGURATIONS RelWithDebInfo Debug
)
-ENDIF()
+ENDIF(WIN32 AND LOG4CXX_INSTALL_PDB)
+
+if(UNIX)
+ set(prefix "${CMAKE_INSTALL_PREFIX}")
+ set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
+ set(libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}")
+ set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
+ set(VERSION "${log4cxx_VERSION_MAJOR}.${log4cxx_VERSION_MINOR}.${log4cxx_VERSION_PATCH}")
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/liblog4cxx.pc.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/liblog4cxx.pc"
+ )
+
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblog4cxx.pc"
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
+endif(UNIX)
+
# create export file which can be imported by other cmake projects
install(EXPORT log4cxxTargets
[logging-log4cxx] 42/49: Remove cpptasks as a dependency
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit a261ca71c7f89db46c932500c209263df88d21d2
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Sun Feb 9 10:03:58 2020 +1100
Remove cpptasks as a dependency
---
pom.xml | 6 ------
src/changes/changes.xml | 3 ++-
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/pom.xml b/pom.xml
index 60ce98a..9f9d562 100644
--- a/pom.xml
+++ b/pom.xml
@@ -298,12 +298,6 @@
<artifactId>ant-contrib</artifactId>
<version>1.0b2</version>
</dependency>
-
- <dependency>
- <groupId>ant-contrib</groupId>
- <artifactId>cpptasks</artifactId>
- <version>1.0b5</version>
- </dependency>
</dependencies>
</plugin>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 7429846..52605a3 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -24,13 +24,14 @@
<body>
<release version="0.11.0"
- date="2020-01-31"
+ date="2020-02-09"
description="Maintenance release.">
<action issue="LOGCXX-506" type="fix">CachedDateFormat reuses timestamps without updating milliseconds after formatting timestamp with ms == 654</action>
<action issue="LOGCXX-503" type="update">Checksums/Signatures don't match for log4cxx binaries</action>
<action issue="LOGCXX-502" type="update">appenderattachable.h function doc formatted "incorrectly"</action>
<action issue="LOGCXX-500" type="update">Logging in Timing-Critical Applications</action>
<action issue="LOGCXX-493" type="fix">Wrong usage of milli- vs. micro- and non- vs. milliseconds in some docs.</action>
+ <action issue="LOGCXX-494" type="fix">Provide a windows build environment for the project by replacing the ant build with a CMake build</action>
<action issue="LOGCXX-488" type="fix">Space after log level hides messages</action>
<action issue="LOGCXX-484" type="fix">Spelling error s/excute/execute</action>
<action issue="LOGCXX-482" type="fix">Build failure with GCC-6</action>
[logging-log4cxx] 04/49: Fix issues building on Linux
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit e3000f6ade371f418a3c72e69589d5af53083abb
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Sat Oct 12 18:34:37 2019 +1100
Fix issues building on Linux
---
CMakeLists.txt | 6 +++---
src/main/include/CMakeLists.txt | 8 ++++----
src/test/cpp/CMakeLists.txt | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c688f1..acd270a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,13 +4,13 @@ project(log4cxx VERSION 0.10.0 LANGUAGES CXX)
# Find Apache Runtime
find_package(apr QUIET)
# If APR find module sets the cache, the following will do nothing
-find_path(APR_INCLUDE_DIR apr.h)
+find_path(APR_INCLUDE_DIR apr.h PATH_SUFFIXES apr-1)
find_library(APR_LIBRARIES NAMES libapr-1 apr-1)
# Find Apache Runtime Utilities
find_package(apr-util QUIET)
# If APR-UTIL find module sets the cache, the following will do nothing
-find_path(APR_UTIL_INCLUDE_DIR apu.h)
+find_path(APR_UTIL_INCLUDE_DIR apu.h PATH_SUFFIXES apr-1)
find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1 aprutil-1)
## Testing
@@ -38,7 +38,7 @@ install(TARGETS log4cxx EXPORT log4cxxTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
-IF(LOG4CXX_INSTALL_PDB)
+IF(WIN32 AND LOG4CXX_INSTALL_PDB)
INSTALL(FILES $<TARGET_PDB_FILE:log4cxx>
DESTINATION ${CMAKE_INSTALL_BINDIR}
CONFIGURATIONS RelWithDebInfo Debug
diff --git a/src/main/include/CMakeLists.txt b/src/main/include/CMakeLists.txt
index 680101d..0afef45 100644
--- a/src/main/include/CMakeLists.txt
+++ b/src/main/include/CMakeLists.txt
@@ -88,10 +88,10 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/private/log4cxx_private.h.in
add_custom_target(configure_log4cxx
COMMAND "${CMAKE_COMMAND}" -E echo "Checking configuration"
DEPENDS
- ${CMAKE_CURRENT_SOURCE_DIR}/include/log4cxx/log4cxx.h.in
- ${CMAKE_CURRENT_SOURCE_DIR}/include/log4cxx/private/log4cxx_private.h.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/log4cxx.h.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx/private/log4cxx_private.h.in
BYPRODUCTS
- ${CMAKE_CURRENT_BINARY_DIR}/include/log4cxx/log4cxx.h
- ${CMAKE_CURRENT_BINARY_DIR}/include/log4cxx/private/log4cxx_private.h
+ ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/log4cxx.h
+ ${CMAKE_CURRENT_BINARY_DIR}/log4cxx/private/log4cxx_private.h
)
endif()
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index ad3665f..7a0ada9 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -50,7 +50,7 @@ add_subdirectory(xml)
foreach(testName IN LISTS ALL_LOG4CXX_TESTS)
target_include_directories(${testName} PRIVATE ${CMAKE_CURRENT_LIST_DIR} $<TARGET_PROPERTY:log4cxx,INCLUDE_DIRECTORIES>)
- target_link_libraries(${testName} PRIVATE log4cxx testingFramework testingUtilities ${APR_LIBRARIES})
+ target_link_libraries(${testName} PRIVATE testingFramework testingUtilities log4cxx ${APR_LIBRARIES})
add_test(NAME ${testName}
COMMAND ${testName} -v
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../resources
[logging-log4cxx] 22/49: Fix some test case failures
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 48c597b2c9f81e543a3282e997775af0a0d654e8
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Sat Feb 1 10:19:17 2020 +1100
Fix some test case failures
---
src/test/cpp/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index 793a30b..1c359fb 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -55,6 +55,7 @@ foreach(testName IN LISTS ALL_LOG4CXX_TESTS)
add_test(NAME ${testName}
COMMAND ${testName} -v
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../resources
+ ENVIRONMENT "TOTO=wonderful;key1=value1;key2=value2"
)
if(WIN32)
set_tests_properties(${testName} PROPERTIES ENVIRONMENT
[logging-log4cxx] 07/49: Build examples when building tests
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit c244c28c01ec609a2371a861c2e960af6a372ed6
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Fri Jan 31 12:44:27 2020 +1100
Build examples when building tests
---
src/CMakeLists.txt | 1 +
src/examples/cpp/CMakeLists.txt | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fced9be..39420dd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -9,4 +9,5 @@ endif()
if(BUILD_TESTING)
add_subdirectory(test)
+ add_subdirectory(examples/cpp)
endif()
diff --git a/src/examples/cpp/CMakeLists.txt b/src/examples/cpp/CMakeLists.txt
new file mode 100644
index 0000000..ed0412a
--- /dev/null
+++ b/src/examples/cpp/CMakeLists.txt
@@ -0,0 +1,7 @@
+set(ALL_LOG4CXX_EXAMPLES console delayedloop stream trivial)
+
+foreach(exampleName IN LISTS ALL_LOG4CXX_EXAMPLES)
+ add_executable(${exampleName} ${exampleName}.cpp)
+ target_include_directories(${exampleName} PRIVATE ${CMAKE_CURRENT_LIST_DIR} $<TARGET_PROPERTY:log4cxx,INCLUDE_DIRECTORIES>)
+ target_link_libraries(${exampleName} PRIVATE log4cxx ${APR_LIBRARIES})
+endforeach()
[logging-log4cxx] 37/49: Remove ant build references from build
instructions. Add instructions for building from source on Windows
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit e0b4e4daae1be3eab12b927b5f554ffafaaa0930
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Fri Feb 7 15:19:32 2020 +1100
Remove ant build references from build instructions. Add instructions for building from source on Windows
---
src/site/apt/building/cmake.apt | 20 +++++++++++++++--
src/site/apt/building/maven.apt | 50 ++++++++++++++++++-----------------------
2 files changed, 40 insertions(+), 30 deletions(-)
diff --git a/src/site/apt/building/cmake.apt b/src/site/apt/building/cmake.apt
index 1ebc303..4e1e888 100644
--- a/src/site/apt/building/cmake.apt
+++ b/src/site/apt/building/cmake.apt
@@ -18,10 +18,10 @@
------
------
-Building Apache log4cxx with cmake
-
* Quick start:
+ Building and testing log4cxx on a Unix platform with packaged APR and APR-Util.
+
Make sure cmake 3.13+, g++ and make are available, install or
build apr 1.x, apr-util 1.x, gzip and zip.
@@ -44,6 +44,22 @@ $ sudo make install
| -DLOG4CXX_CFSTRING=yes | Enable CFString API methods, requires Mac OS/X CoreFoundation, choice of yes, no (default). |
*------------------------+---------------------------------------------------------------------------------------------+
+ Building and testing log4cxx on a Microsoft Windows with APR, Expat and APR-Util built from source
+ extracted into apr-1.7.0, libexpat(from github) and apr-util-1.6.1 in %HOMEPATH%\Libraries.
+
++------------+
+ cd %HOMEPATH%\Libraries
+ cmake -S libexpat\expat -B buildtrees\expat -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
+ cmake --build buildtrees\expat --target install --config Release
+ cmake -S apr-1.7.0 -B buildtrees\apr -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
+ cmake --build buildtrees\apr --target install --config Release
+ set CMAKE_PATH_PREFIX=%HOMEPATH%\Libraries\installed
+ cmake -S apr-util-1.6.1 -B buildtrees\apr-util -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
+ cmake --build buildtrees\apr-util --target install --config Release
+ cmake -S apache-log4cxx-x.x.x -B buildtrees\log4cxx -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
+ cmake --build buildtrees\log4cxx --target install --config Release
++------------+
+
* Platform specific notes:
** Mac OS/X:
diff --git a/src/site/apt/building/maven.apt b/src/site/apt/building/maven.apt
index a090497..865cc5a 100644
--- a/src/site/apt/building/maven.apt
+++ b/src/site/apt/building/maven.apt
@@ -21,38 +21,41 @@
Building Apache log4cxx with Apache Maven 2
{{{https://maven.apache.org}Apache Maven 2}} is used to generate the release assemblies and generate
- product documentation. It delegates to the {{{./ant.html}Apache Ant build}} to build
- and test log4cxx and can be used as an alternate front end to the Ant
- build process since it can automatically download and use ant-contrib,
- cpptasks and log4j.
- The Maven build, like the Ant build, can build APR and APR-Util from source.
+ product documentation. It delegates to {{{./cmake.html}CMake}} to build
+ and test log4cxx and can be used as an alternate front end to the CMake
+ build process since it can automatically download and use cmake,
+ and log4j.
* Quick start:
*Install {{{https://maven.apache.org}Apache Maven}} 2.0.8 or later.
- *Install APR and APR-Util or place source in apr and apr-util directories in same parent directory
- as log4cxx directory.
+ *Install APR and APR-Util.
Building and testing log4cxx on a Unix platform with packaged APR and APR-Util.
+----+
-$ sudo apt-get install libapr1-dev libaprutil1-dev doxygen
-$ cd apache-log4cxx-x.x.x
-$ export PATH=/home/myself/maven-2.0.8/bin:$PATH
-$ mvn package
+ sudo apt-get install libapr1-dev libaprutil1-dev doxygen
+ cd apache-log4cxx-x.x.x
+ export PATH=/home/myself/maven-3.6.3/bin:$PATH
+ mvn package
+----+
- Building and testing log4cxx on a Microsoft Windows with APR and APR-Util built from source.
+ Building and testing log4cxx on a Microsoft Windows with APR, Expat and APR-Util built from source
+ extracted into apr-1.7.0, libexpat(from github) and apr-util-1.6.1 in %HOMEPATH%\Libraries.
+----+
-$ set PATH=\maven-2.0.8\bin;%PATH%
-$ tar -xvzf apr-1.2.12.tar.gz
-$ rename apr-1.2.12 apr
-$ tar -xvzf apr-util-1.2.12.tar.gz
-$ rename apr-util-1.2.12 apr-util
-$ cd apache-log4cxx-x.x.x
-$ mvn package
+ cd %HOMEPATH%\Libraries
+ cmake -S libexpat\expat -B buildtrees\expat -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
+ cmake --build buildtrees\expat --target install --config Release
+ cmake -S apr-1.7.0 -B buildtrees\apr -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
+ cmake --build buildtrees\apr --target install --config Release
+ set CMAKE_PATH_PREFIX=%HOMEPATH%\Libraries\installed
+ cmake -S apr-util-1.6.1 -B buildtrees\apr-util -DCMAKE_INSTALL_PREFIX=%HOMEPATH%\Libraries\installed
+ cmake --build buildtrees\apr-util --target install --config Release
+ cd apache-log4cxx-x.x.x
+ set PATH=%MAVEN_HOME%\bin;%PATH%
+ mvn package
+----+
* Common Maven targets
@@ -73,14 +76,5 @@ $ mvn package
All build products will be placed in the target subdirectory.
- It is not possible to directly pass options to the Ant build, however the ant build will read
- any build.properties file in the log4cxx directory. The file has to be in the default format
- for {{{https://en.wikipedia.org/wiki/.properties}Java properties files}}, especially one must not
- provide options using the syntax -Dxy=z like on the shell, but only as xy=z per line.
-
SMTP and ODBC options can depend on libraries that that have different licenses. You should
review the corresponding licenses and understand the implications before redistribution.
-
-* Platform specific notes:
-
- See the {{{./ant.html}Apache Ant build}} for platform specific notes.
[logging-log4cxx] 08/49: Use cmake from maven to build and only use
ant for site deployment and release
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit e64b7cf0fbdd2f799cd83a7361d4ceefb75eff84
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Fri Jan 31 14:09:59 2020 +1100
Use cmake from maven to build and only use ant for site deployment and release
---
build.xml | 1726 +--------------------------------------
pom.xml | 170 +++-
src/ant/apr-build.xml | 851 -------------------
src/ant/apr-util-build.xml | 722 ----------------
src/ant/common.xml | 43 -
src/ant/esmtp-build.xml | 207 -----
src/ant/find-apr-util.xml | 369 ---------
src/ant/find-apr.xml | 370 ---------
src/ant/find-libesmtp.xml | 363 --------
src/assembly/source.xml | 43 +-
src/site/apt/building/cmake.apt | 75 ++
src/site/apt/building/vcpkg.apt | 41 +
src/site/site.xml | 11 +-
13 files changed, 270 insertions(+), 4721 deletions(-)
diff --git a/build.xml b/build.xml
index f0ffe82..d4d292a 100644
--- a/build.xml
+++ b/build.xml
@@ -17,50 +17,6 @@
-->
<!DOCTYPE project [
-<!ENTITY libsets '
- <libset libs="${apr-util.lib.prefix}${apr-util.lib.name}${apr-util.lib.suffix}"
- dir="${apr-util.lib.dir}"
- if="apr-util.lib.dir"
- />
- <libset libs="${apr-util.lib.prefix}${apr-util.lib.name}${apr-util.lib.suffix}"
- unless="apr-util.lib.dir"
- />
- <libset libs="${apr.lib.prefix}${apr.lib.name}${apr.lib.suffix}"
- dir="${apr.lib.dir}"
- if="apr.lib.dir"
- />
- <libset libs="${apr.lib.prefix}${apr.lib.name}${apr.lib.suffix}"
- unless="apr.lib.dir"
- />
- <libset libs="esmtp"
- dir="${esmtp.lib.dir}"
- if="esmtp.lib.dir"
- />
- <libset libs="esmtp"
- if="has-libesmtp"
- unless="esmtp.lib.dir"
- />
- <libset libs="${odbc.lib}"
- if="odbc.lib"
- />
- <libset libs="${apr-util.dependencies}"
- if="apr-util.dependencies"
- unless="apr-util-includes-dependencies"
- />
- <libset libs="pthread"
- if="is-unix"
- />
-
- <syslibset libs="advapi32 mswsock shell32 ws2_32"
- if="is-windows"
- />
- <syslibset libs="stdc++"
- if="is-gcc"
- />
- <syslibset libs="cw32mt"
- if="is-bcc"
- />
-'>
<!ENTITY license '
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -78,21 +34,14 @@
limitations under the License.
'>
<!ENTITY common SYSTEM 'src/ant/common.xml'>
-<!ENTITY find-apr SYSTEM 'src/ant/find-apr.xml'>
-<!ENTITY find-apr-util SYSTEM 'src/ant/find-apr-util.xml'>
-<!ENTITY find-libesmtp SYSTEM 'src/ant/find-libesmtp.xml'>
]>
<!--
- This file builds log4cxx using Apache Ant (http://ant.apache.org)
- and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
+ This file releases log4cxx using Apache Ant (http://ant.apache.org)
-->
-<project name="log4cxx" default="check">
+<project name="log4cxx" default="usage">
&common;
- &find-apr;
- &find-apr-util;
- &find-libesmtp;
<property name="base.dir"
location="."
@@ -149,27 +98,6 @@
<property name="lib.prefix"
value=""
/>
- <property name="enable-char"
- value="1"
- />
- <property name="enable-wchar_t"
- value="1"
- />
- <property name="enable-unichar"
- value="0"
- />
- <property name="enable-cfstring"
- value="0"
- />
- <property name="with-charset"
- value="auto"
- />
- <property name="with-SMTP"
- value="no"
- />
- <property name="with-ODBC"
- value="auto"
- />
<propertyregex property="version.major"
input="${project.version}"
@@ -206,106 +134,20 @@
/>
<target name="usage"
- description="Describes usage of the build script">
+ description="Describes usage of the release script">
<echo>
- Ant build file for log4cxx
+ Ant file for releasing log4cxx
Common invocations:
- > ant
-
- will attempt to locate APR and APR-util in /usr, /usr/local/apr and ..
-
- Builds and tests log4cxx.
-
- > ant -Dwith-apr=APRPATH -Dwith-apr-util=APUPATH
-
- Builds and tests log4cxx using APR and APR-Util at specified location
-
> ant -p
Displays available targets
-
- > ant build-projects-vc6
-
- Builds Microsoft Visual Studio 6 projects.
- -vc7, -vc8, -vc9 and -xcode for Visual Studio .NET, 2005, 2008 and Apple Xcode 2 and later.
- respectively.
-
- Command line options:
-
- -Ddebug=[true|false]
- -Doptimize=[speed|size|none]
- -Dversion=n.n.n
- -Dlib.type=[shared|static] (Library type to create, default=shared)
- -Denable-char=[0, 1] (expose char* API, default=1)
- -Denable-wchar_t=[0, 1] (expose wchar_t* API, default=1)
- -Denable-unichar=[0, 1] (expose UniChar API, default=0)
- -Denable-cfstring[0, 1] (expose CFString API, default=0)
- -Dwith-charset=[auto|utf-8|iso-8859-1|usascii|ebcdic] (default=auto)
- -Dwith-logchar=[utf-8|wchar_t|unichar] (default=utf-8 on Unix, wchar_t on Windows)
- -Dwith-apr=APRPATH
- -Dwith-apr-util=PATH
- -Dwith-SMTP=[libesmtp, no] (default no)
- -Dwith-ODBC=[auto, unixODBC, iODBC, Microsoft, no] (default=auto resulting in no on Unix, Microsoft on Windows)
</echo>
</target>
<target name="init"
depends="common-init">
- <property name="log4cxx.lib.dir"
- value="${executable.dir}"
- />
- <mkdir dir="${log4cxx.lib.dir}" />
-
- <condition property="with-logchar"
- value="wchar_t">
- <isset property="is-windows" />
- </condition>
- <property name="with-logchar"
- value="utf-8"
- />
-
- <condition property="has-libesmtp"
- value="1">
- <equals arg1="${with-SMTP}"
- arg2="libesmtp"
- />
- </condition>
-
- <condition property="odbc.lib"
- value="iodbc">
- <equals arg1="${with-ODBC}"
- arg2="iODBC"
- />
- </condition>
-
- <condition property="odbc.lib"
- value="unixodbc">
- <equals arg1="${with-ODBC}"
- arg2="unixODBC"
- />
- </condition>
-
- <condition property="odbc.lib"
- value="odbc32">
- <and>
- <not>
- <equals arg1="${with-ODBC}"
- arg2="no"
- />
- </not>
- <isset property="is-windows" />
- </and>
- </condition>
-
- <condition property="has-ODBC"
- value="1">
- <isset property="odbc.lib" />
- </condition>
- <property name="has-ODBC"
- value="0"
- />
<condition property="force-ant"
value="1">
@@ -316,494 +158,6 @@
<echo>force-ant: ${force-ant}</echo>
</target>
- <target name="clean"
- depends="init"
- description="Removes built files">
- <delete dir="${target.dir}" />
- <delete>
- <fileset dir="${include.dir}/log4cxx"
- includes="**/log4cxx.h"
- />
- </delete>
- </target>
-
- <target name="unix-configure"
- if="is-unix">
- <copy tofile="${include.dir}/log4cxx/log4cxx.tmp"
- file="${include.dir}/log4cxx/log4cxx.h.in"
- overwrite="true"
- />
- <copy tofile="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- file="${include.dir}/log4cxx/private/log4cxx_private.h.in"
- overwrite="true"
- />
- </target>
-
- <target name="win-configure"
- if="is-windows">
- <copy tofile="${include.dir}/log4cxx/log4cxx.tmp"
- file="${include.dir}/log4cxx/log4cxx.hw"
- overwrite="true"
- />
- <copy tofile="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- file="${include.dir}/log4cxx/private/log4cxx_private.hw"
- overwrite="true"
- />
- </target>
-
- <target name="configure"
- depends="init, unix-configure, win-configure">
- <echo message="Configuring with-logchar=${with-logchar}" />
- <echo message="Configuring with-charset=${with-charset}" />
- <echo message="Configuring with-SMTP=${with-SMTP}" />
- <echo message="Configuring with-ODBC=${with-ODBC}" />
- <echo message="Configuring enable-char=${enable-char}" />
- <echo message="Configuring enable-wchar_t=${enable-wchar_t}" />
- <echo message="Configuring enable-unichar=${enable-unichar}" />
- <echo message="Configuring enable-cfstring=${enable-cfstring}" />
-
- <condition property="logchar_is_utf8"
- value="1">
- <equals arg1="${with-logchar}"
- arg2="utf-8"
- />
- </condition>
- <property name="logchar_is_utf8"
- value="0"
- />
-
- <condition property="logchar_is_unichar"
- value="1">
- <equals arg1="${with-logchar}"
- arg2="unichar"
- />
- </condition>
- <property name="logchar_is_unichar"
- value="0"
- />
-
- <condition property="logchar_is_wchar"
- value="1">
- <equals arg1="${with-logchar}"
- arg2="wchar_t"
- />
- </condition>
- <property name="logchar_is_wchar"
- value="0"
- />
-
- <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
- match="@LOGCHAR_IS_UNICHAR@"
- replace="${logchar_is_unichar}"
- />
-
- <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
- match="@LOGCHAR_IS_UTF8@"
- replace="${logchar_is_utf8}"
- />
-
- <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
- match="@LOGCHAR_IS_WCHAR@"
- replace="${logchar_is_wchar}"
- />
-
- <condition property="charset_is_utf8"
- value="1">
- <equals arg1="${with-charset}"
- arg2="utf-8"
- />
- </condition>
- <property name="charset_is_utf8"
- value="0"
- />
-
- <condition property="charset_is_iso-8859-1"
- value="1">
- <equals arg1="${with-charset}"
- arg2="iso-8859-1"
- />
- </condition>
- <property name="charset_is_iso-8859-1"
- value="0"
- />
-
- <condition property="charset_is_usascii"
- value="1">
- <equals arg1="${with-charset}"
- arg2="usascii"
- />
- </condition>
- <property name="charset_is_usascii"
- value="0"
- />
-
- <condition property="charset_is_ebcdic"
- value="1">
- <equals arg1="${with-charset}"
- arg2="ebcdic"
- />
- </condition>
- <property name="charset_is_ebcdic"
- value="0"
- />
-
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="@CHARSET_UTF8@"
- replace="${charset_is_utf8}"
- />
-
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="@CHARSET_ISO88591@"
- replace="${charset_is_iso-8859-1}"
- />
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="@CHARSET_USASCII@"
- replace="${charset_is_usascii}"
- />
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="@CHARSET_EBCDIC@"
- replace="${charset_is_ebcdic}"
- />
-
- <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
- match="@CHAR_API@"
- replace="${enable-char}"
- />
-
- <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
- match="@WCHAR_T_API@"
- replace="${enable-wchar_t}"
- />
-
- <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
- match="@UNICHAR_API@"
- replace="${enable-unichar}"
- />
-
- <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
- match="@CFSTRING_API@"
- replace="${enable-cfstring}"
- />
-
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="@HAS_SYSLOG@"
- replace="1"
- />
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="@HAS_STD_LOCALE@"
- replace="1"
- />
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="@HAS_MBSRTOWCS@"
- replace="1"
- />
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="@HAS_WCSTOMBS@"
- replace="1"
- />
- <condition property="has-fwide" value="0">
- <isset property="is-cygwin" />
- </condition>
- <property name="has-fwide"
- value="1"
- />
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="@HAS_FWIDE@"
- replace="${has-fwide}"
- />
-
- <condition property="has-libesmtp-value" value="1">
- <isset property="has-libesmtp" />
- </condition>
- <property name="has-libesmtp-value"
- value="0"
- />
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="LOG4CXX_HAVE_LIBESMTP 0"
- replace="LOG4CXX_HAVE_LIBESMTP ${has-libesmtp-value}"
- />
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="@HAS_LIBESMTP@"
- replace="${has-libesmtp-value}"
- />
-
- <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- match="@HAS_ODBC@"
- replace="${has-ODBC}"
- />
-
- <antcall target="copy-if-changed">
- <param name="tofile"
- value="${include.dir}/log4cxx/log4cxx.h"
- />
- <param name="file"
- value="${include.dir}/log4cxx/log4cxx.tmp"
- />
- </antcall>
- <delete file="${include.dir}/log4cxx/log4cxx.tmp" />
- <antcall target="copy-if-changed">
- <param name="tofile"
- value="${include.dir}/log4cxx/private/log4cxx_private.h"
- />
- <param name="file"
- value="${include.dir}/log4cxx/private/log4cxx_private.tmp"
- />
- </antcall>
- <delete file="${include.dir}/log4cxx/private/log4cxx_private.tmp" />
- </target>
-
- <target name="build-apr"
- depends="find-apr"
- unless="apr.lib.file">
- <fail unless="apr.src.dir">Could not locate apr library or source.</fail>
-
- <property name="apr.lib.type"
- value="static"
- />
- <property name="apr.lib.prefix"
- value=""
- />
- <property name="apr.lib.suffix"
- value=""
- />
- <property name="project.type"
- value="msvc6"
- />
-
- <ant antfile="src/ant/apr-build.xml"
- target="build"
- inheritAll="false">
- <property name="basedir"
- value="${apr.src.dir}"
- />
- <property name="target.dir"
- value="${target.dir}"
- />
- <property name="debug"
- value="${debug}"
- />
- <property name="lib.prefix"
- value="${apr.lib.prefix}"
- />
- <property name="lib.suffix"
- value="${apr.lib.suffix}"
- />
- <property name="compiler"
- value="${compiler}"
- />
- <property name="runtime"
- value="${runtime}"
- />
- <property name="lib.type"
- value="${apr.lib.type}"
- />
- <property name="project.type"
- value="${project.type}"
- />
- <property name="projects.dir"
- value="${projects.dir}"
- />
- <property name="project.if.value"
- value="${project.if}"
- />
- <property name="use-pic"
- value="${use-pic}"
- />
- <property name="os.family"
- value="${os.family}"
- />
- </ant>
-
- <condition property="apr.lib.dir"
- value="${target.dir}/${debug.release}/shared">
- <equals arg1="${apr.lib.type}"
- arg2="shared"
- />
- </condition>
-
- <property name="apr.lib.dir"
- location="${target.dir}/${debug.release}/static"
- />
- <property name="apr.project.file"
- location="${projects.dir}/apr"
- />
- </target>
-
- <target name="build-apr-util"
- depends="build-apr, find-apr-util"
- unless="apr-util.lib.file">
- <fail unless="apr-util.src.dir">Could not locate apr-util library or source.</fail>
-
- <property name="apr-util.lib.type"
- value="${apr.lib.type}"
- />
- <property name="apr-util.lib.prefix"
- value=""
- />
- <property name="apr-util.lib.suffix"
- value=""
- />
- <property name="project.type"
- value="msvc6"
- />
- <!-- built this way, apr-util will include expat and doesn't need an external reference -->
- <property name="apr-util-includes-dependencies"
- value="1"
- />
-
- <ant antfile="src/ant/apr-util-build.xml"
- target="build"
- inheritAll="false">
- <property name="target.dir"
- value="${target.dir}"
- />
- <property name="basedir"
- value="${apr-util.src.dir}"
- />
- <property name="debug"
- value="${debug}"
- />
- <property name="lib.prefix"
- value="${apr-util.lib.prefix}"
- />
- <property name="lib.suffix"
- value="${apr-util.lib.suffix}"
- />
- <property name="compiler"
- value="${compiler}"
- />
- <property name="runtime"
- value="${runtime}"
- />
- <property name="apr.include.dir"
- value="${apr.include.dir}"
- />
- <property name="apr.lib.dir"
- value="${apr.lib.dir}"
- />
- <property name="apr.lib.type"
- value="${apr.lib.type}"
- />
- <property name="lib.type"
- value="${apr-util.lib.type}"
- />
- <property name="project.type"
- value="${project.type}"
- />
- <property name="projects.dir"
- value="${projects.dir}"
- />
- <property name="project.if.value"
- value="${project.if}"
- />
- <property name="use-pic"
- value="${use-pic}"
- />
- <property name="os.family"
- value="${os.family}"
- />
- </ant>
-
- <condition property="apr-util.lib.dir"
- value="${target.dir}/${debug.release}/shared">
- <equals arg1="${apr-util.lib.type}"
- arg2="shared"
- />
- </condition>
- <property name="apr-util.lib.dir"
- location="${target.dir}/${debug.release}/static"
- />
- <property name="apr-util.project.file"
- location="${projects.dir}/apr-util"
- />
- </target>
-
- <target name="build-libesmtp"
- depends="find-esmtp"
- if="has-libesmtp"
- unless="esmtp.lib.file">
- <fail unless="esmtp.src.dir">Could not locate libesmtp library or source.</fail>
-
- <property name="esmtp.lib.type"
- value="static"
- />
- <property name="esmtp.lib.prefix"
- value=""
- />
- <property name="esmtp.lib.suffix"
- value=""
- />
- <property name="project.type"
- value="msvc6"
- />
- <condition property="esmtp.compiler"
- value="gcc">
- <equals arg1="${compiler}"
- arg2="g++"
- />
- </condition>
- <property name="esmtp.compiler"
- value="${compiler}"
- />
-
- <ant antfile="src/ant/esmtp-build.xml"
- target="build"
- inheritAll="false">
- <property name="target.dir"
- value="${target.dir}"
- />
- <property name="basedir"
- value="${esmtp.src.dir}"
- />
- <property name="debug"
- value="${debug}"
- />
- <property name="lib.prefix"
- value="${esmtp.lib.prefix}"
- />
- <property name="lib.suffix"
- value="${esmtp.lib.suffix}"
- />
- <property name="compiler"
- value="${esmtp.compiler}"
- />
- <property name="runtime"
- value="${runtime}"
- />
- <property name="lib.type"
- value="${esmtp.lib.type}"
- />
- <property name="project.type"
- value="${project.type}"
- />
- <property name="projects.dir"
- value="${projects.dir}"
- />
- <property name="project.if.value"
- value="${project.if}"
- />
- <property name="use-pic"
- value="${use-pic}"
- />
- <property name="os.family"
- value="${os.family}"
- />
- </ant>
-
- <condition property="esmtp.lib.dir"
- value="${target.dir}/${debug.release}/shared">
- <equals arg1="${esmtp.lib.type}"
- arg2="shared"
- />
- </condition>
- <property name="esmtp.lib.dir"
- location="${target.dir}/${debug.release}/static"
- />
- <property name="esmtp.project.file"
- location="${projects.dir}/libesmtp"
- />
- </target>
-
<target name="make-header-check">
<echo file="${header}.cpp"
append="false">
@@ -813,7 +167,6 @@
</target>
<target name="header-check"
- depends="build-apr-util, configure"
description="Checks headers against Effective C++ guidelines">
<fail unless="is-gcc">Requires GCC compiler</fail>
@@ -837,574 +190,39 @@
includes="**/*.h"
/>
</path>
- </foreach>
- <property name="project.type"
- value="msvc6"
- />
- <cc objdir="${target.dir}/header-check"
- name="gcc"
- exceptions="true"
- subsystem="gui"
- optimize="${optimize}"
- multithreaded="true"
- relentless="true"
- debug="${debug}"
- projectsOnly="${projectsOnly}">
-
- <compilerarg value="-Weffc++"
- />
- <compilerarg value="-Wall"
- />
- <compilerarg value="${pic-option}"
- if="pic-option"
- />
- <fileset dir="${target.dir}/header-check"
- includes="**/*.cpp"
- excludes="log4cxx/private/*.cpp **/aprinitializer.h.cpp"
- />
- <includepath path="${include.dir}" />
- <project outfile="${projects.dir}/projects/header-check"
- type="${project.type}"
- if="project.if"
- />
- </cc>
- </target>
-
- <target name="update-rc-files-version-info"
- description="Provides current version information for Windows resource files."
- if="is-windows"
- unless="is-bcc">
- <replaceregexp file="${resources.dir}/log4cxx.rc"
- match="FILEVERSION \d+, \d+, \d+, \d+"
- replace="FILEVERSION ${version.major}, ${version.minor}, 0, ${version.rev}"
- />
- <replaceregexp file="${resources.dir}/log4cxx.rc"
- match="PRODUCTVERSION \d+, \d+, \d+, \d+"
- replace="PRODUCTVERSION ${version.major}, ${version.minor}, 0, ${version.rev}"
- />
- <replaceregexp file="${resources.dir}/log4cxx.rc"
- match=""FileVersion", "\d+, \d+, \d+, \d+""
- replace=""FileVersion", "${version.major}, ${version.minor}, 0, ${version.rev}""
- />
- <replaceregexp file="${resources.dir}/log4cxx.rc"
- match=""ProductVersion", "\d+, \d+, \d+, \d+""
- replace=""ProductVersion", "${version.major}, ${version.minor}, 0, ${version.rev}""
- />
- </target>
-
- <target name="restore-rc-files-version-info"
- description="Restores version information for Windows resource files to their default values."
- if="is-windows"
- unless="is-bcc">
- <replaceregexp file="${resources.dir}/log4cxx.rc"
- match="FILEVERSION \d+, \d+, \d+, \d+"
- replace="FILEVERSION 0, 0, 0, 0"
- />
- <replaceregexp file="${resources.dir}/log4cxx.rc"
- match="PRODUCTVERSION \d+, \d+, \d+, \d+"
- replace="PRODUCTVERSION 0, 0, 0, 0"
- />
- <replaceregexp file="${resources.dir}/log4cxx.rc"
- match=""FileVersion", "\d+, \d+, \d+, \d+""
- replace=""FileVersion", "0, 0, 0, 0""
- />
- <replaceregexp file="${resources.dir}/log4cxx.rc"
- match=""ProductVersion", "\d+, \d+, \d+, \d+""
- replace=""ProductVersion", "0, 0, 0, 0""
- />
- </target>
-
- <target name="build-lib"
- depends="build-apr-util, build-libesmtp, configure"
- description="Build log4cxx library">
- <mkdir dir="${log4cxx.lib.dir}/log4cxx_obj" />
-
- <condition property="apr-static"
- value="1">
- <equals arg1="${apr.lib.type}"
- arg2="static"
- />
- </condition>
-
- <condition property="apr-util-static"
- value="1">
- <equals arg1="${apr-util.lib.type}"
- arg2="static"
- />
- </condition>
-
- <condition property="apr-libs-match"
- value="1">
- <equals arg1="${apr.lib.type}"
- arg2="${apr-util.lib.type}"
- />
- </condition>
-
- <fail unless="apr-libs-match">
- apr is ${apr.lib.type} and apr-util is ${apr-util.lib.type}, must be same type.
- </fail>
- <property name="lib.name"
- value="log4cxx"
- />
- <property name="lib.prefix"
- value=""
- />
- <property name="lib.suffix"
- value=""
- />
-
- <condition property="apr-util.dependencies"
- value="expat iconv">
- <equals arg1="${apr-util.lib.type}"
- arg2="static"
- />
- </condition>
-
- <property name="project.compiler"
- value="${compiler}"
- />
- <property name="project.type"
- value="msvc6"
- />
-
- <condition property="resource.compiler"
- value="windres">
- <isset property="is-gcc" />
- </condition>
- <condition property="resource.compiler"
- value="brc">
- <isset property="is-bcc" />
- </condition>
- <property name="resource.compiler"
- value="msrc"
- />
-
- <antcall target="update-rc-files-version-info" />
-
- <cc name="${project.compiler}"
- exceptions="true"
- outfile="${log4cxx.lib.dir}/${lib.prefix}${lib.name}${lib.suffix}"
- outputfileproperty="log4cxx.lib.file"
- subsystem="console"
- multithreaded="true"
- runtime="${runtime}"
- outtype="${lib.type}"
- objdir="${log4cxx.lib.dir}/log4cxx_obj"
- debug="${debug}"
- projectsOnly="${projectsOnly}"
- failonerror="true">
-
- <!-- brc aborts with an access violation. -->
- <compiler name="${resource.compiler}"
- if="is-windows"
- unless="is-bcc">
- <includepath path="${resources.dir}" />
- <fileset dir="${resources.dir}"
- includes="*.rc"
- />
- </compiler>
-
- <fileset dir="${src.dir}"
- includes="*.cpp"
- />
- <fileset dir="${include.dir}"
- includes="**/*.h"
- />
-
- <includepath path="${include.dir}"
- />
- <includepath path="${apr.include.dir}"
- if="apr.include.dir"
- />
- <includepath path="${apr-util.include.dir}"
- if="apr-util.include.dir"
- />
- <includepath path="${esmtp.include.dir}"
- if="esmtp.include.dir"
- />
-
- <defineset define="LOG4CXX"
- />
- <defineset define="LOG4CXX_STATIC"
- if="is-static"
- />
- <defineset define="APR_DECLARE_STATIC"
- if="apr-static"
- />
- <defineset define="APU_DECLARE_STATIC"
- if="apr-util-static"
- />
- <defineset define="WIN32 _USRDLL DLL_EXPORTS"
- if="is-windows"
- />
-
- <compilerarg value="${pic-option}"
- if="pic-option"
- />
-
- &libsets;
-
- <project type="${project.type}"
- outfile="${projects.dir}/projects/${lib.name}"
- if="project.if">
- <comment>&license;</comment>
- <dependency file="${projects.dir}/apr" />
- <dependency file="${projects.dir}/xml" />
- <dependency file="${projects.dir}/aprutil" depends="apr,xml" />
- <dependency name="${projects.dir}/libesmtp" />
- </project>
- </cc>
-
- <antcall target="restore-rc-files-version-info" />
-
- <!-- copy liblog4cxx.so to log4cxx.dll for MinGW and Cygwin -->
- <condition property="copy.log4cxx"
- value="${log4cxx.lib.dir}/${lib.prefix}${lib.name}${lib.suffix}.dll">
- <and>
- <os family="windows" />
- <isset property="is-gcc" />
- <equals arg1="${lib.type}" arg2="shared" />
- <isset property="log4cxx.lib.file" />
- </and>
- </condition>
- </target>
-
- <target name="build"
- depends="build-lib"
- if="copy.log4cxx">
- <copy file="${log4cxx.lib.file}"
- tofile="${copy.log4cxx}"
- overwrite="true"
- preservelastmodified="true"
- />
- </target>
-
- <target name="build-example">
- <mkdir dir="${log4cxx.lib.dir}/${example.name}_obj" />
-
- <property name="project.compiler"
- value="${compiler}"
- />
- <property name="project.type"
- value="msvc6"
- />
- <property name="example.include.dir"
- value="${example.src.dir}"
- />
-
- <cc name="${project.compiler}"
- exceptions="true"
- outfile="${log4cxx.lib.dir}/${example.name}"
- subsystem="console"
- multithreaded="true"
- runtime="${runtime}"
- outtype="executable"
- objdir="${log4cxx.lib.dir}/${example.name}_obj"
- debug="${debug}"
- projectsOnly="${projectsOnly}">
-
- <fileset dir="${example.src.dir}"
- includes="${example.includes}"
- />
-
- <includepath path="${include.dir}" />
- <includepath path="${example.include.dir}" />
- <includepath path="${apr.include.dir}" if="apr.include.dir" />
-
- <defineset define="WIN32"
- if="is-windows"
- />
- <defineset define="LOG4CXX_STATIC"
- if="is-static"
- />
- <defineset define="APR_DECLARE_STATIC"
- if="apr-static"
- />
-
- <compilerarg value="${pic-option}" if="pic-option" />
-
- <libset libs="${lib.prefix}${lib.name}${lib.suffix}"
- dir="${log4cxx.lib.dir}"
- />
- &libsets;
-
- <project outfile="${projects.dir}/projects/${example.name}"
- type="${project.type}"
- if="project.if">
- <comment>&license;</comment>
- <dependency file="${projects.dir}/apr" />
- <dependency file="${projects.dir}/xml" />
- <dependency name="${projects.dir}/aprutil" depends="apr,xml" />
- <dependency name="${projects.dir}/libesmtp" />
- <dependency file="${projects.dir}/log4cxx" depends="apr,aprutil,xml" />
- </project>
- </cc>
- </target>
-
- <target name="run-example">
- <!-- remove any stray configuration files -->
- <delete>
- <fileset dir="${log4cxx.lib.dir}"
- includes="log4*.properties log4*.xml"
- />
- </delete>
- <exec executable="${log4cxx.lib.dir}/${example.name}"
- dir="${log4cxx.lib.dir}"
- failonerror="true">
- <env key="DYLD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
- />
- <env key="LD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
- />
- <env key="Path"
- value="${env.Path}"
- />
- </exec>
- </target>
-
- <target name="build-delayedloop"
- depends="build">
- <antcall target="build-example">
- <param name="example.src.dir"
- value="${examples.dir}"
- />
- <param name="example.name"
- value="delayedloop"
- />
- <param name="example.includes"
- value="delayedloop.cpp"
- />
- </antcall>
- </target>
-
- <target name="build-trivial"
- depends="build">
- <antcall target="build-example">
- <param name="example.src.dir"
- value="${examples.dir}"
- />
- <param name="example.name"
- value="trivial"
- />
- <param name="example.includes"
- value="trivial.cpp"
- />
- </antcall>
- </target>
-
- <target name="build-console"
- depends="build">
- <antcall target="build-example">
- <param name="example.src.dir"
- value="${examples.dir}"
- />
- <param name="example.name"
- value="console"
- />
- <param name="example.includes"
- value="console.cpp"
- />
- </antcall>
- </target>
-
- <target name="build-stream"
- depends="build">
- <antcall target="build-example">
- <param name="example.src.dir"
- value="${examples.dir}"
- />
- <param name="example.name"
- value="stream"
- />
- <param name="example.includes"
- value="stream.cpp"
- />
- </antcall>
- </target>
-
- <target name="build-examples"
- depends="build-delayedloop, build-trivial, build-stream, build-console"
- description="Builds example programs"
- />
-
- <target name="build-unittest"
- depends="build"
- description="Builds unit test app">
- <mkdir dir="${log4cxx.lib.dir}/testsuite_obj" />
-
- <property name="project.compiler"
- value="${compiler}"
- />
- <property name="project.type"
- value="msvc6"
- />
-
- <cc name="${project.compiler}"
- exceptions="true"
- outfile="${log4cxx.lib.dir}/testsuite"
- subsystem="console"
- multithreaded="true"
- runtime="${runtime}"
- outputfileproperty="testsuite.exe"
- outtype="executable"
- objdir="${log4cxx.lib.dir}/testsuite_obj"
- debug="${debug}"
- projectsOnly="${projectsOnly}"
- failonerror="true">
-
- <fileset dir="${tests.cpp.dir}"
- includes="**/*.cpp **/*.c **/*.h"
- />
-
- <includepath path="${include.dir}"
- />
- <includepath path="${apr.include.dir}"
- if="apr.include.dir"
- />
- <includepath path="${apr-util.include.dir}"
- if="apr-util.include.dir"
- />
-
- <defineset define="LOG4CXX_STATIC"
- if="is-static"
- />
- <defineset define="APR_DECLARE_STATIC"
- if="apr-static"
- />
- <defineset define="APU_DECLARE_STATIC"
- if="apr-util-static"
- />
- <defineset define="WIN32"
- if="is-windows"
- />
-
- <compilerarg value="${pic-option}"
- if="pic-option"
- />
-
- <libset libs="${lib.prefix}${lib.name}${lib.suffix}"
- dir="${log4cxx.lib.dir}"
- />
- &libsets;
-
- <project outfile="${projects.dir}/projects/testsuite"
- type="${project.type}"
- if="project.if">
- <comment>&license;</comment>
-
- <dependency file="${projects.dir}/apr" />
- <dependency file="${projects.dir}/xml" />
- <dependency file="${projects.dir}/aprutil" depends="apr,xml" />
- <dependency name="${projects.dir}/libesmtp" />
- <dependency file="${projects.dir}/log4cxx" depends="apr,aprutil,libesmtp" />
- </project>
- </cc>
- </target>
-
- <target name="build-standalone-unittest"
- description="Builds a unit tests + log4cxx executable"
- depends="build-apr-util, build-libesmtp, configure">
- <mkdir dir="${executable.dir}/static/testsuite-standalone_obj" />
-
- <property name="project.compiler"
- value="${compiler}"
- />
+ </foreach>
<property name="project.type"
value="msvc6"
/>
- <condition property="resource.compiler"
- value="windres">
- <isset property="is-gcc" />
- </condition>
- <property name="resource.compiler"
- value="msrc"
- />
-
- <cc name="${project.compiler}"
+ <cc objdir="${target.dir}/header-check"
+ name="gcc"
exceptions="true"
- outfile="${executable.dir}/static/testsuite-standalone"
- subsystem="console"
+ subsystem="gui"
+ optimize="${optimize}"
multithreaded="true"
- runtime="${runtime}"
- outputfileproperty="testsuite-standalone.exe"
- outtype="executable"
- objdir="${executable.dir}/static/testsuite-standalone_obj"
+ relentless="true"
debug="${debug}"
projectsOnly="${projectsOnly}">
- <compiler name="${resource.compiler}"
- if="is-windows">
- <includepath path="${resources.dir}" />
- <fileset dir="${resources.dir}"
- includes="*.rc"
- />
- </compiler>
-
- <fileset dir="${src.dir}"
- includes="*.cpp"
- excludes="**/iconv_module.cpp"
- />
- <fileset dir="${include.dir}"
- includes="**/*.h"
- />
- <fileset dir="${tests.cpp.dir}"
- includes="**/*.cpp **/*.c **/*.h"
- />
-
- <includepath path="${include.dir}" />
- <includepath path="${apr.include.dir}"
- if="apr.include.dir"
- />
- <includepath path="${apr-util.include.dir}"
- if="apr-util.include.dir"
- />
- <includepath path="${esmtp.include.dir}"
- if="esmtp.include.dir"
- />
-
- <defineset define="LOG4CXX"
- />
- <defineset define="APR_DECLARE_STATIC"
- if="apr-static"
- />
- <defineset define="APU_DECLARE_STATIC"
- if="apr-util-static"
+ <compilerarg value="-Weffc++"
/>
- <defineset define="WIN32"
- if="is-windows"
+ <compilerarg value="-Wall"
/>
-
<compilerarg value="${pic-option}"
if="pic-option"
/>
- &libsets;
-
+ <fileset dir="${target.dir}/header-check"
+ includes="**/*.cpp"
+ excludes="log4cxx/private/*.cpp **/aprinitializer.h.cpp"
+ />
<includepath path="${include.dir}" />
- <includepath path="${apr.include.dir}" />
-
- <defineset define="LOG4CXX" />
-
- <libset libs="cw32mt" if="is-bcc" />
-
- <project outfile="${projects.dir}/projects/testsuite-standalone"
+ <project outfile="${projects.dir}/projects/header-check"
type="${project.type}"
- if="project.if">
- <comment>&license;</comment>
-
- <dependency file="${projects.dir}/apr" />
- <dependency file="${projects.dir}/xml" />
- <dependency file="${projects.dir}/aprutil" depends="apr,xml" />
- <dependency name="${projects.dir}/libesmtp" />
- </project>
+ if="project.if"
+ />
</cc>
</target>
- <target name="build-all"
- depends="build-examples, build-unittest"
- description="Builds all artifacts"
- />
-
<target name="clean-output"
depends="init">
<delete>
@@ -1414,229 +232,8 @@
</delete>
</target>
- <target name="run-defaultinit-unittest"
- depends="build-unittest">
- <antcall target="run-defaultinit-log4X">
- <param name="config"
- value="log4j"
- />
- </antcall>
- <antcall target="run-defaultinit-log4X">
- <param name="config"
- value="log4cxx"
- />
- </antcall>
- </target>
-
- <target name="run-defaultinit-log4X">
- <mkdir dir="${tests.output.dir}" />
-
- <!-- test of log4j.properties -->
- <delete>
- <fileset dir="${log4cxx.lib.dir}"
- includes="*.properties *.xml"
- />
- </delete>
- <exec executable="${testsuite.exe}"
- dir="${log4cxx.lib.dir}"
- failonerror="true">
- <arg value="-v" />
- <arg value="testcase1" />
-
- <env key="DYLD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
- />
- <env key="LD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
- />
- </exec>
-
- <copy tofile="${log4cxx.lib.dir}/${config}.xml"
- file="${tests.resources.dir}/input/xml/defaultInit.xml"
- overwrite="true"
- />
- <exec executable="${testsuite.exe}"
- dir="${log4cxx.lib.dir}"
- failonerror="true">
- <arg value="-v" />
- <arg value="testcase2" />
-
- <env key="DYLD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
- />
- <env key="LD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
- />
- </exec>
- <delete>
- <fileset dir="${log4cxx.lib.dir}"
- includes="*.properties *.xml"
- />
- </delete>
-
- <copy tofile="${log4cxx.lib.dir}/${config}.properties"
- file="${tests.resources.dir}/input/defaultInit3.properties"
- overwrite="true"
- />
- <exec executable="${testsuite.exe}"
- dir="${log4cxx.lib.dir}"
- failonerror="true">
- <arg value="-v" />
- <arg value="testcase3" />
-
- <env key="DYLD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
- />
- <env key="LD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
- />
- </exec>
- <delete>
- <fileset dir="${log4cxx.lib.dir}"
- includes="*.properties *.xml"
- />
- </delete>
-
- <copy file="${tests.resources.dir}/input/xml/defaultInit.xml"
- tofile="${log4cxx.lib.dir}/${config}.xml"
- />
- <copy file="${tests.resources.dir}/input/defaultInit3.properties"
- tofile="${log4cxx.lib.dir}/${config}.properties"
- />
- <exec executable="${testsuite.exe}"
- dir="${log4cxx.lib.dir}"
- failonerror="true">
- <arg value="-v" />
- <arg value="testcase4" />
-
- <env key="LD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
- />
- <env key="DYLD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
- />
- </exec>
- <delete>
- <fileset dir="${log4cxx.lib.dir}"
- includes="*.properties *.xml"
- />
- </delete>
- </target>
-
- <target name="run-unittest"
- depends="build-unittest, run-defaultinit-unittest, clean-output"
- description="Runs unit test">
- <property environment="env" />
- <mkdir dir="${tests.output.dir}" />
- <delete>
- <fileset dir="${tests.output.dir}"
- includes="*"
- />
- </delete>
-
- <exec executable="${testsuite.exe}"
- dir="${tests.resources.dir}"
- failonerror="true">
- <arg value="-v" />
-
- <env key="TOTO"
- value="wonderful"
- />
- <env key="key1"
- value="value1"
- />
- <env key="key2"
- value="value2"
- />
- <env key="LD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
- />
- <env key="DYLD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
- />
- <env key="Path"
- value="${log4cxx.lib.dir};${env.Path}"
- />
- </exec>
-
- <available property="dom3-status"
- value=""
- file="src/test/resources/output/dom³"
- />
- <available property="dom4-status"
- value=""
- file="src/test/resources/output/dom㆕"
- />
-
- <property name="dom3-status"
- value="NOT"
- />
- <property name="dom4-status"
- value="NOT"
- />
-
- <echo>output/dom³ was ${dom3-status} created in DOMTestCase::test3</echo>
- <echo>output/dom㆕ was ${dom4-status} created in DOMTestCase::test4</echo>
- </target>
-
- <target name="run-standalone-unittest"
- depends="build-standalone-unittest, clean-output"
- description="Runs standalone unit test">
- <property environment="env" />
- <mkdir dir="${tests.output.dir}" />
- <delete>
- <fileset dir="${tests.output.dir}"
- includes="*"
- />
- </delete>
-
- <exec executable="${log4cxx-standalone-test.exe}"
- dir="${tests.resources.dir}"
- failonerror="true">
- <arg value="-v" />
-
- <env key="TOTO"
- value="wonderful"
- />
- <env key="key1"
- value="value1"
- />
- <env key="key2"
- value="value2"
- />
- <env key="DYLD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
- />
- <env key="LD_LIBRARY_PATH"
- value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
- />
- <env key="Path"
- value="${log4cxx.lib.dir};${env.Path}"
- />
- </exec>
-
- <available property="dom3-status"
- value=""
- file="src/test/resources/output/dom³"
- />
- <available property="dom4-status"
- value=""
- file="src/test/resources/output/dom㆕"
- />
-
- <property name="dom3-status"
- value="NOT"
- />
- <property name="dom4-status"
- value="NOT"
- />
-
- <echo>output/dom³ was ${dom3-status} created in DOMTestCase::test3</echo>
- <echo>output/dom㆕ was ${dom4-status} created in DOMTestCase::test4</echo>
- </target>
-
<target name="run-socketserver"
- depends="build-unittest, clean-output"
+ depends="clean-output"
description="Runs SocketServer test">
<property environment="env" />
<mkdir dir="${tests.output.dir}" />
@@ -1680,216 +277,6 @@
</parallel>
</target>
- <target name="build-projects">
- <mkdir dir="${projects.dir}/projects" />
- <property name="project.type"
- value="msvc6"
- />
-
- <antcall target="build-unittest">
- <param name="project.if"
- value="true"
- />
- <param name="project.type"
- value="${project.type}"
- />
- <param name="project.compiler"
- value="${project.compiler}"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="projectsOnly"
- value="true"
- />
- <param name="os.family"
- value="${os.family}"
- />
- <param name="find"
- value="${find}"
- />
- </antcall>
-
- <antcall target="build-standalone-unittest">
- <param name="project.if"
- value="true"
- />
- <param name="project.type"
- value="${project.type}"
- />
- <param name="project.compiler"
- value="${project.compiler}"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="projectsOnly"
- value="true"
- />
- <param name="os.family"
- value="${os.family}"
- />
- <param name="find"
- value="${find}"
- />
- </antcall>
-
- <antcall target="build-examples">
- <param name="project.if"
- value="true"
- />
- <param name="project.type"
- value="${project.type}"
- />
- <param name="project.compiler"
- value="${project.compiler}"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="projectsOnly"
- value="true"
- />
- <param name="os.family"
- value="${os.family}"
- />
- <param name="find"
- value="${find}"
- />
- </antcall>
- </target>
-
- <target name="build-projects-vc6"
- depends="init"
- description="Builds project files for Microsoft Visual C++ 6">
- <antcall target="build-projects">
- <param name="project.type"
- value="msvc6"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="find"
- value="${find}"
- />
- </antcall>
- </target>
-
- <target name="build-projects-vc7"
- depends="init"
- description="Builds project files for Microsoft Visual Studio .NET">
- <antcall target="build-projects">
- <param name="project.type"
- value="msvc7"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="find"
- value="${find}"
- />
- </antcall>
- </target>
-
- <target name="build-projects-vc8"
- depends="init"
- description="Builds project files for Microsoft Visual C++ 2005">
- <antcall target="build-projects">
- <param name="project.type"
- value="msvc8"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="find"
- value="${find}"
- />
- </antcall>
- </target>
-
-
- <target name="build-projects-vc9"
- depends="init"
- description="Builds project files for Microsoft Visual C++ 2008">
- <antcall target="build-projects">
- <param name="project.type"
- value="msvc9"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="find"
- value="${find}"
- />
- </antcall>
- </target>
-
- <target name="build-projects-xcode"
- depends="init"
- description="Builds project files for Apple Xcode">
- <antcall target="build-projects">
- <param name="project.type"
- value="xcode"
- />
- <param name="project.compiler"
- value="gcc"
- />
- <param name="os.family"
- value="mac"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="find"
- value="${find}"
- />
- </antcall>
- </target>
-
- <target name="test-compile"
- depends="build-unittest, build-examples"
- />
-
- <target name="check"
- depends="run-unittest, build-examples"
- description="Runs all diagnostic tests">
- <antcall target="run-example">
- <param name="example.name"
- value="trivial"
- />
- </antcall>
-
- <antcall target="run-example">
- <param name="example.name"
- value="stream"
- />
- </antcall>
- </target>
-
<target name="apidocs"
description="Build log4cxx manual">
<copy file="${base.dir}/src/site/doxy/Doxyfile.in"
@@ -1954,66 +341,6 @@
</replaceregexp>
</target>
- <target name="gen-release-projects">
- <antcall target="build-projects-vc6">
- <param name="find" value="false" />
- </antcall>
-
- <antcall target="build-projects-xcode">
- </antcall>
-
- <replaceregexp flags="ig"
- match="ADD LINK32 .*/NOLOGO"
- replace="ADD LINK32 ADVAPI32.LIB WS2_32.LIB MSWSOCK.LIB SHELL32.LIB ODBC32.LIB /NOLOGO">
- <fileset dir="${target.dir}"
- includes="**/*.dsp"
- />
- </replaceregexp>
-
- <replaceregexp flags="g"
- match=".\\apr.dsp"
- replace="..\\\\..\\\\apr\\\\apr.dsp">
- <fileset dir="${target.dir}"
- includes="**/*.dsw"
- />
- </replaceregexp>
-
- <replaceregexp flags="g"
- match=".\\aprutil.dsp"
- replace="..\\\\..\\\\apr-util\\\\aprutil.dsp">
- <fileset dir="${target.dir}"
- includes="**/*.dsw"
- />
- </replaceregexp>
-
- <replaceregexp flags="g"
- match=".\\xml.dsp"
- replace="..\\\\..\\\\apr-util\\\\xml\\\\expat\\\\lib\\\\xml.dsp">
- <fileset dir="${target.dir}"
- includes="**/*.dsw"
- />
- </replaceregexp>
-
- <!-- drop library search path -->
- <replaceregexp flags="g"
- match="<string>[\./]*/usr/lib</string>"
- replace="">
- <fileset dir="${target.dir}"
- includes="**/*.pbxproj"
- />
- </replaceregexp>
-
- <replace dir="${target.dir}"
- includes="**/*.pbxproj"
- token="/usr/include/apr-1.0"
- value="/usr/include/apr-1"
- />
- <replace dir="${target.dir}" includes="**/*.pbxproj"
- token="MacOSX10.4u.sdk"
- value="MacOSX10.5.sdk"
- />
- </target>
-
<target name="site-text-file-cleanup">
<fixcrlf srcDir="${base.dir}/${subDir}"
tab="asis"
@@ -2042,10 +369,6 @@
</antcall>
</target>
- <target name="gump"
- depends="check, header-check"
- />
-
<target name="prepare-changes"
description="Prepares changes.xml from a JIRA issues list">
<xslt style="src/changes/changes.xslt"
@@ -2174,19 +497,10 @@
</target>
<target name="autogen"
- depends="init"
if="is-unix">
<exec executable="sh">
<arg value="autogen.sh" />
</exec>
-
- <!--
- This was coupled with "site" originally, but made building "site" itself on Windows unneccessary
- hard and the projects are not even used on the website, but only in releases instead. This target
- is called in that case and some part of project files generation is unix centered already, too.
- -->
- <antcall target="gen-release-projects">
- </antcall>
</target>
</project>
diff --git a/pom.xml b/pom.xml
index abdf7f7..1bd985a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
<groupId>log4cxx</groupId>
<artifactId>apache-log4cxx</artifactId>
<packaging>pom</packaging>
- <version>0.11.0-SNAPSHOT</version>
+ <version>0.11.0</version>
<name>Apache log4cxx</name>
<description>Logging framework for C++.</description>
<url>http://logging.apache.org/log4cxx</url>
@@ -65,7 +65,7 @@
<connection>scm:git:http://gitbox.apache.org/repos/asf/logging-log4cxx.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/logging-log4cxx.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=logging-log4cxx.git</url>
- <tag>HEAD</tag>
+ <tag>v0.11.0-RC1</tag>
</scm>
<properties>
@@ -74,6 +74,7 @@
<releaseVersion>${project.version}</releaseVersion>
<releaseManager>Matt Sicker</releaseManager>
<releaseKey>B62BABE8</releaseKey>
+ <windowsArchitecture>x64</windowsArchitecture>
</properties>
<organization>
@@ -179,50 +180,59 @@
<build>
<plugins>
+ <plugin>
+ <groupId>com.googlecode.cmake-maven-project</groupId>
+ <artifactId>cmake-maven-plugin</artifactId>
+ <version>3.14.5-b1</version>
+ <executions>
+ <execution>
+ <id>cmake-generate</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <sourcePath>${project.basedir}</sourcePath>
+ <targetPath>${project.build.directory}/${platform}</targetPath>
+ <classifier>${cmake.classifier}</classifier>
+ <options>${cmake.options}</options>
+ <environmentVariables>
+ <CMAKE_CLASSIFIER>${cmake.classifier}</CMAKE_CLASSIFIER>
+ </environmentVariables>
+ <downloadBinaries>${download.cmake}</downloadBinaries>
+ </configuration>
+ </execution>
+ <execution>
+ <id>cmake-compile</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <projectDirectory>${project.build.directory}/${platform}</projectDirectory>
+ <classifier>${cmake.classifier}</classifier>
+ <config>${cmake.config}</config>
+ <downloadBinaries>true</downloadBinaries>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test</phase>
+ <id>cmake-run-tests</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <buildDirectory>${project.build.directory}/${platform}</buildDirectory>
+ <testFailureIgnore>true</testFailureIgnore>
+ <ctest.skip.tests>${maven.test.skip}</ctest.skip.tests>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
- <phase>compile</phase>
- <id>compile</id>
- <configuration>
- <target>
- <ant target="build" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
- <phase>test-compile</phase>
- <id>test-compile</id>
- <configuration>
- <target unless="${maven.test.skip}">
- <ant target="test-compile" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
- <phase>test</phase>
- <id>test</id>
- <configuration>
- <target unless="${maven.test.skip}">
- <ant target="check" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
<phase>package</phase>
<id>autogen</id>
<configuration>
@@ -394,4 +404,82 @@
<url>file:///${user.dir}/target/site-deploy/${project.version}</url>
</site>
</distributionManagement>
+
+ <profiles>
+ <profile>
+ <id>linux-x86_64-debug</id>
+ <properties>
+ <platform>linux-x86_64</platform>
+ <build.type>debug</build.type>
+ </properties>
+ </profile>
+ <profile>
+ <id>linux-x86_64-release</id>
+ <activation>
+ <os>
+ <family>linux</family>
+ <arch>amd64</arch>
+ </os>
+ </activation>
+ <properties>
+ <platform>linux-x86_64</platform>
+ <build.type>release</build.type>
+ <cmake.classifier>linux-x86_64</cmake.classifier>
+ </properties>
+ </profile>
+ <profile>
+ <id>Win32</id>
+ <properties>
+ <windowsArchitecture>Win32</windowsArchitecture>
+ </properties>
+ </profile>
+ <profile>
+ <id>windows-debug</id>
+ <properties>
+ <platform>windows-${windowsArchitecture}</platform>
+ <build.type>debug</build.type>
+ <cmake.classifier>windows-x86_64</cmake.classifier>
+ <cmake.options>-A${windowsArchitecture}</cmake.options>
+ <cmake.config>${build.type}</cmake.config>
+ </properties>
+ </profile>
+ <profile>
+ <id>windows-release</id>
+ <activation>
+ <os>
+ <family>windows</family>
+ <arch>amd64</arch>
+ </os>
+ </activation>
+ <properties>
+ <platform>windows-${windowsArchitecture}</platform>
+ <build.type>release</build.type>
+ <cmake.classifier>windows-x86_64</cmake.classifier>
+ <cmake.options>-A${windowsArchitecture}</cmake.options>
+ <cmake.config>${build.type}</cmake.config>
+ </properties>
+ </profile>
+ <profile>
+ <id>mac-x86_64-debug</id>
+ <properties>
+ <platform>mac-x86_64</platform>
+ <build.type>debug</build.type>
+ <cmake.classifier>mac-x86_64</cmake.classifier>
+ </properties>
+ </profile>
+ <profile>
+ <id>mac-x86_64-release</id>
+ <activation>
+ <os>
+ <family>mac</family>
+ <arch>x86_64</arch>
+ </os>
+ </activation>
+ <properties>
+ <platform>mac-x86_64</platform>
+ <build.type>release</build.type>
+ <cmake.classifier>mac-x86_64</cmake.classifier>
+ </properties>
+ </profile>
+ </profiles>
</project>
diff --git a/src/ant/apr-build.xml b/src/ant/apr-build.xml
deleted file mode 100644
index 9812ae0..0000000
--- a/src/ant/apr-build.xml
+++ /dev/null
@@ -1,851 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<!DOCTYPE project [
-<!ENTITY common SYSTEM 'common.xml'>
-<!ENTITY license '
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-'>
-]>
-<!--
- This file builds APR using Apache Ant (http://ant.apache.org)
- and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
--->
-<project name="apr" default="check">
-
-&common;
-
-<property name="src.dir"
- location="${basedir}"
-/>
-<property name="include.dir"
- location="${src.dir}/include"
-/>
-<property name="test.dir"
- location="${src.dir}/test"
-/>
-<property name="target.dir"
- location="${basedir}/target"
-/>
-<property name="lib.name"
- value="apr-1"
-/>
-<property name="lib.prefix"
- value=""
-/>
-<property environment="env"
-/>
-
-<target name="usage"
- description="Displays usage notes on build">
- <echo></echo>
-</target>
-
-<target name="clean"
- description="Removes build product files">
- <delete dir="${target.dir}" />
-</target>
-
-<target name="win-configure"
- if="is-windows">
- <copy file="${include.dir}/apr.hw"
- tofile="${include.dir}/apr.tmp"
- overwrite="true"
- />
- <replaceregexp file="${include.dir}/apr.tmp"
- match="typedef *int *uid_t;"
- replace="/* typedef int uid_t */"
- />
- <replaceregexp file="${include.dir}/apr.tmp"
- match="typedef *int *gid_t;"
- replace="/* typedef int gid_t */"
- />
- <antcall target="copy-if-changed">
- <param name="file"
- value="${include.dir}/apr.tmp"
- />
- <param name="tofile"
- value="${include.dir}/apr.h"
- />
- </antcall>
-</target>
-
-<target name="check-configure"
- if="is-unix">
- <condition property="force-configure"
- value="1">
- <not>
- <available file="${include.dir}/apr.h" />
- </not>
- </condition>
-</target>
-
-<target name="unix-configure"
- depends="check-configure"
- if="force-configure">
- <!-- Shelling to configure allows cygwin to work -->
- <exec executable="sh" dir="${src.dir}">
- <arg value="./configure" />
- </exec>
-</target>
-
-<target name="init"
- depends="common-init">
- <condition property="arch"
- value="win32">
- <isset property="is-windows" />
- </condition>
- <property name="arch"
- value="unix"
- />
-</target>
-
-<target name="configure"
- depends="init, unix-configure, win-configure"
-/>
-
-<target name="build"
- depends="configure"
- description="Build library">
- <mkdir dir="${executable.dir}/apr-ofiles" />
- <property name="project.compiler"
- value="${compiler}"
- />
- <property name="project.type"
- value="msvc6"
- />
-
- <cc name="${project.compiler}"
- outfile="${executable.dir}/${lib.prefix}${lib.name}${lib.suffix}"
- subsystem="console"
- multithreaded="true"
- runtime="${runtime}"
- outtype="${lib.type}"
- objdir="${executable.dir}/apr-ofiles"
- outputfileproperty="apr-1.dll"
- debug="${debug}"
- projectsOnly="${projectsOnly}">
- <!-- Suppressing misc/win32/rand.c since it needs to include rpc.h -->
- <fileset dir="${src.dir}"
- includes="**/${arch}/*.c"
- excludes="**/apr_app.c misc/win32/rand.c"
- />
- <fileset dir="${src.dir}"
- includes="**/${arch}/apr_app.c"
- if="is-static"
- />
- <fileset dir="${src.dir}/file_io/unix"
- includes="copy.c fileacc.c filepath_util.c fullrw.c mktemp.c tempdir.c"
- />
- <fileset dir="${src.dir}/memory/unix"
- includes="*.c"
- />
- <fileset dir="${src.dir}/misc/unix"
- includes="errorcodes.c getopt.c otherchild.c version.c"
- />
- <fileset dir="${src.dir}/mmap/unix"
- includes="common.c"
- />
- <fileset dir="${src.dir}/network_io/unix"
- includes="inet_ntop.c inet_pton.c sockaddr.c"
- />
- <fileset dir="${src.dir}/poll/unix"
- includes="*.c"
- />
- <fileset dir="${src.dir}/random/unix"
- includes="*.c"
- />
- <fileset dir="${src.dir}/strings"
- includes="*.c"
- />
- <fileset dir="${src.dir}/tables"
- includes="*.c"
- />
- <fileset dir="${include.dir}"
- includes="*.h"
- />
- <fileset dir="${include.dir}/arch"
- includes="*.h"
- />
- <fileset dir="${include.dir}/arch/${arch}"
- includes="*.h"
- />
- <fileset dir="${include.dir}/arch/unix"
- includes="*.h"
- />
- <fileset dir="${src.dir}/support/unix"
- includes="waitio.c"
- />
-
- <includepath path="${include.dir}" />
- <includepath path="${include.dir}/arch" />
- <includepath path="${include.dir}/arch/${arch}" />
- <includepath path="${include.dir}/arch/unix" />
-
- <defineset define="APR_DECLARE_EXPORT"
- if="is-shared"
- />
- <defineset define="APR_DECLARE_STATIC"
- unless="is-shared"
- />
- <defineset if="is-windows">
- <define name="WIN32" value="1" />
- </defineset>
- <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
- if="is-gcc"
- />
- <defineset define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK"
- if="is-mac"
- />
- <defineset if="is-bcc">
- <define name="_dup2"
- value="dup2"
- />
- <define name="_isatty"
- value="isatty"
- />
- <define name="_setmode"
- value="setmode"
- />
- </defineset>
- <!--
- apr_atomic.c is not linkable in VS2013 x86 and the only somewhat easy workaround was
- to claim we are not VS2013, which only works because what we use to claim this is not
- used elsewhere and doesn't seem to introduce any other problems for now.
-
- https://groups.google.com/forum/#!topic/aprdev/bc1ILvUe-fk
- https://groups.google.com/forum/#!topic/unimrcp/Iybpn51UYnI
- -->
- <defineset define="__MINGW32__"
- if="env.VS120COMNTOOLS"
- />
-
- <compilerarg value="${pic-option}"
- if="pic-option"
- />
-
- <libset libs="advapi32 mswsock rpcrt4 ws2_32"
- if="is-windows"
- />
- <libset libs="pthread dl"
- if="is-unix"
- />
- <libset libs="cw32mt"
- if="is-bcc"
- />
-
- <project type="${project.type}"
- outfile="${projects.dir}/projects/apr"
- if="project.if">
- <comment>&license;</comment>
- </project>
- </cc>
-
- <property name="apr.lib.dir"
- location="${executable.dir}"
- />
-</target>
-
-<target name="build-test">
- <mkdir dir="${executable.dir}/apr-test-ofiles" />
- <property name="project.compiler"
- value="${compiler}"
- />
- <property name="project.type"
- value="msvc6"
- />
-
- <cc name="${project.compiler}"
- outfile="${executable.dir}/${test}"
- subsystem="console"
- multithreaded="true"
- runtime="${runtime}"
- outtype="executable"
- objdir="${executable.dir}/apr-test-ofiles"
- debug="${debug}"
- projectsOnly="${projectsOnly}">
- <fileset dir="${test.dir}"
- includes="${testfiles}"
- />
-
- <includepath path="${include.dir}" />
-
- <defineset if="is-windows">
- <define name="WIN32" value="1" />
- </defineset>
- <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
- if="is-gcc"
- />
- <defineset define="APR_DECLARE_STATIC"
- unless="is-shared"
- />
- <defineset define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK"
- if="is-mac"
- />
- <compilerarg value="${pic-option}" if="pic-option"
- />
-
- <libset dir="${apr.lib.dir}"
- libs="${lib.prefix}${lib.name}${lib.suffix}"
- />
- <libset libs="cw32mt"
- if="is-bcc"
- />
- <libset libs="pthread dl"
- if="is-unix"
- />
- <libset libs="advapi32 ws2_32 mswsock rpcrt4"
- if="is-windows"
- />
-
- <project type="${project.type}"
- outfile="${projects.dir}/projects/${test}"
- if="project.if">
- <comment>&license;</comment>
- <dependency file="${projects.dir}/apr" />
- </project>
- </cc>
-</target>
-
-<target name="run-test">
- <exec executable="${apr.lib.dir}/${test}"
- dir="${apr.lib.dir}"
- failonerror="true">
- <env key="DYLD_LIBRARY_PATH"
- value="${apr.lib.dir}:${env.DYLD_LIBRARY_PATH}"
- />
- <env key="LD_LIBRARY_PATH"
- value="${apr.lib.dir}:${env.LD_LIBRARY_PATH}"
- />
- </exec>
-</target>
-
-<target name="build-testlockperf"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="testlockperf"
- />
- <param name="testfiles"
- value="testlockperf.c"
- />
- </antcall>
-</target>
-
-<target name="run-testlockperf"
- depends="build-testlockperf">
- <antcall target="run-test">
- <param name="test"
- value="testlockperf"
- />
- </antcall>
-</target>
-
-<target name="build-testshmproducer"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="testshmproducer"
- />
- <param name="testfiles"
- value="testshmproducer.c"
- />
- </antcall>
-</target>
-
-<target name="build-testshmconsumer"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="testshmconsumer"
- />
- <param name="testfiles"
- value="testshmconsumer.c"
- />
- </antcall>
-</target>
-
-
-<target name="build-testmutexscope"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="testmutexscope"
- />
- <param name="testfiles"
- value="testmutexscope.c"
- />
- </antcall>
-</target>
-
-<target name="run-testmutexscope"
- depends="build-testmutexscope">
- <antcall target="run-test">
- <param name="test"
- value="testmutexscope"
- />
- </antcall>
-</target>
-
-<target name="build-occhild"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="occhild"
- />
- <param name="testfiles"
- value="occhild.c"
- />
- </antcall>
-</target>
-
-<target name="build-sockchild"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="sockchild"
- />
- <param name="testfiles"
- value="sockchild.c"
- />
- </antcall>
-</target>
-
-<target name="build-readchild"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="readchild"
- />
- <param name="testfiles"
- value="readchild.c"
- />
- </antcall>
-</target>
-
-<target name="build-globalmutexchild"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="globalmutexchild"
- />
- <param name="testfiles"
- value="globalmutexchild.c"
- />
- </antcall>
-</target>
-
-<target name="build-tryread"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="tryread"
- />
- <param name="testfiles"
- value="tryread.c"
- />
- </antcall>
-</target>
-
-<target name="build-proc_child"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="proc_child"
- />
- <param name="testfiles"
- value="proc_child.c"
- />
- </antcall>
-</target>
-
-<target name="build-sendfile"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="sendfile"
- />
- <param name="testfiles"
- value="sendfile.c"
- />
- </antcall>
-</target>
-
-<target name="build-mod_test"
- depends="build">
- <mkdir dir="${executable.dir}/test-ofiles" />
- <mkdir dir="${executable.dir}/.libs" />
-
- <property name="project.compiler"
- value="${compiler}"
- />
- <property name="project.type"
- value="msvc6"
- />
-
- <cc name="${project.compiler}"
- outfile="${executable.dir}/.libs/mod_test"
- subsystem="console"
- multithreaded="true"
- runtime="${runtime}"
- outtype="shared"
- objdir="${executable.dir}/test-ofiles"
- outputfileproperty="libmod_test.so"
- debug="${debug}"
- projectsOnly="${projectsOnly}">
- <fileset dir="${test.dir}"
- includes="mod_test.c"
- />
-
- <includepath path="${include.dir}" />
-
- <defineset if="is-windows">
- <define name="WIN32" value="1" />
- </defineset>
- <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
- if="is-gcc"
- />
- <defineset define="APR_DECLARE_STATIC"
- unless="is-shared"
- />
- <defineset define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK"
- if="is-mac"
- />
- <compilerarg value="${pic-option}"
- if="pic-option"
- />
-
- <libset dir="${apr.lib.dir}"
- libs="${lib.prefix}${lib.name}${lib.suffix}"
- />
- <libset libs="cw32mt"
- if="is-bcc"
- />
- <libset libs="advapi32 ws2_32 mswsock rpcrt4"
- if="is-windows"
- />
-
- <project type="${project.type}"
- outfile="${projects.dir}/projects/mod_test"
- if="project.if">
- <comment>&license;</comment>
- <dependency file="${projects.dir}/apr-1" />
- </project>
- </cc>
-
- <copy file="${libmod_test.so}"
- tofile="${executable.dir}/.libs/mod_test.so"
- />
-</target>
-
-<target name="build-testall"
- depends="build">
- <mkdir dir="${executable.dir}/test-ofiles" />
- <property name="project.compiler"
- value="${compiler}"
- />
- <property name="project.type"
- value="msvc6"
- />
-
- <cc name="${project.compiler}"
- outfile="${executable.dir}/testall"
- subsystem="console"
- multithreaded="true"
- runtime="${runtime}"
- outtype="executable"
- objdir="${executable.dir}/test-ofiles"
- debug="${debug}"
- projectsOnly="${projectsOnly}">
- <fileset dir="${test.dir}"
- includes="*.c">
- <exclude name="nw_misc.c" />
- <exclude name="testlockperf.c" />
- <exclude name="occhild.c" />
- <exclude name="sockchild.c" />
- <exclude name="sockperf.c" />
- <exclude name="echod.c" />
- <exclude name="mockchild.c" />
- <exclude name="readchild.c" />
- <exclude name="globalmutexchild.c" />
- <exclude name="tryread.c" />
- <exclude name="proc_child.c" />
- <exclude name="sendfile.c" />
- <exclude name="testshmproducer.c" />
- <exclude name="testshmconsumer.c" />
- <exclude name="testmutexscope.c" />
- <exclude name="testapp.c" />
- </fileset>
-
- <includepath path="${include.dir}" />
-
- <defineset if="is-windows">
- <define name="WIN32" value="1" />
- </defineset>
- <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
- if="is-gcc"
- />
- <defineset define="APR_DECLARE_STATIC"
- unless="is-shared"
- />
- <defineset define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK"
- if="is-mac"
- />
- <compilerarg value="${pic-option}"
- if="pic-option"
- />
-
- <libset dir="${apr.lib.dir}"
- libs="${lib.prefix}${lib.name}${lib.suffix}"
- />
- <libset libs="cw32mt"
- if="is-bcc"
- />
- <libset libs="pthread dl"
- if="is-unix"
- />
- <libset libs="advapi32 ws2_32 mswsock rpcrt4"
- if="is-windows"
- />
-
- <project type="${project.type}"
- outfile="${projects.dir}/projects/testall"
- if="project.if">
- <comment>&license;</comment>
- <dependency file="${projects.dir}/apr-1" />
- </project>
- </cc>
-</target>
-
-<target name="run-testall"
- depends="build-testall,
- build-mod_test,
- build-tryread,
- build-readchild,
- build-globalmutexchild,
- build-occhild,
- build-proc_child,
- build-testshmconsumer,
- build-testshmproducer,
- build-sockchild">
- <mkdir dir="${executable.dir}/data" />
- <copy todir="${executable.dir}/data">
- <fileset dir="${test.dir}/data"
- includes="*"
- />
- </copy>
- <exec executable="${executable.dir}/testall"
- dir="${executable.dir}"
- failonerror="true">
- <env key="DYLD_LIBRARY_PATH"
- value="${apr.lib.dir}:${executable.dir}/.libs:${env.DYLD_LIBRARY_PATH}"
- />
- <env key="LD_LIBRARY_PATH"
- value="${apr.lib.dir}:${executable.dir}/.libs:${env.LD_LIBRARY_PATH}"
- />
- </exec>
-</target>
-
-<target name="build-check"
- depends="build-testlockperf,
- build-testshmproducer,
- build-testshmconsumer,
- build-testmutexscope,
- build-testall"
- description="Builds all test applications"
-/>
-
-<target name="check"
- depends="run-testlockperf, run-testall"
- description="Runs all test applications">
-</target>
-
-<target name="build-projects">
- <mkdir dir="${projects.dir}" />
- <antcall target="build">
- <param name="project.if"
- value="true"
- />
- <param name="project.type"
- value="${project.type}"
- />
- <param name="project.compiler"
- value="${project.compiler}"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="projectsOnly"
- value="true"
- />
- <param name="arch"
- value="${arch}"
- />
- </antcall>
- <antcall target="build-check">
- <param name="project.if"
- value="true"
- />
- <param name="project.type"
- value="${project.type}"
- />
- <param name="project.compiler"
- value="${project.compiler}"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="projectsOnly"
- value="true"
- />
- <param name="arch"
- value="${arch}"
- />
- </antcall>
-</target>
-
-<target name="build-projects-vc6"
- depends="init"
- description="Builds project files for Microsoft Visual C++ 6">
- <antcall target="build-projects">
- <param name="project.type"
- value="msvc6"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- </antcall>
-</target>
-
-<target name="build-projects-vc7"
- depends="init"
- description="Builds project files for Microsoft Visual Studio .NET">
- <antcall target="build-projects">
- <param name="project.type"
- value="msvc7"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- </antcall>
-</target>
-
-<target name="build-projects-vc8"
- depends="init"
- description="Builds project files for Microsoft Visual C++ 2005">
- <antcall target="build-projects">
- <param name="project.type"
- value="msvc8"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- </antcall>
-</target>
-
-<target name="build-projects-vc9"
- depends="init"
- description="Builds project files for Microsoft Visual C++ 2008">
- <antcall target="build-projects">
- <param name="project.type"
- value="msvc9"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- </antcall>
-</target>
-
-<target name="build-projects-xcode"
- depends="init"
- description="Builds project files for Apple Xcode">
- <antcall target="build-projects">
- <param name="project.type"
- value="xcode"
- />
- <param name="project.compiler"
- value="${compiler}"
- />
- <param name="os.family"
- value="mac"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- </antcall>
-</target>
-
-</project>
diff --git a/src/ant/apr-util-build.xml b/src/ant/apr-util-build.xml
deleted file mode 100644
index 70ba3b2..0000000
--- a/src/ant/apr-util-build.xml
+++ /dev/null
@@ -1,722 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<!DOCTYPE project [
-<!ENTITY common SYSTEM 'common.xml'>
-<!ENTITY find-apr SYSTEM 'find-apr.xml'>
-<!ENTITY license '
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-'>
-]>
-
-<!--
- This file builds APR using Apache Ant (http://ant.apache.org)
- and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
--->
-<project name="aprutil" default="check" basedir=".">
-
-&common;
-&find-apr;
-
-<property name="src.dir"
- location="${basedir}"
-/>
-<property name="include.dir"
- location="${src.dir}/include"
-/>
-<property name="target.dir"
- location="${basedir}/target"
-/>
-
-<target name="usage"
- description="Displays usage notes">
- <echo></echo>
-</target>
-
-<target name="init"
- depends="common-init">
- <condition property="arch"
- value="win32">
- <isset property="is-windows" />
- </condition>
- <property name="arch"
- value="unix"
- />
-</target>
-
-<target name="clean"
- description="Deletes build products">
- <delete dir="${target.dir}" />
-</target>
-
-<target name="configure-check"
- depends="init">
- <condition property="aprutil-config-available"
- value="true">
- <and>
- <available file="${include.dir}/apu.h" />
- <available file="${include.dir}/apu_want.h" />
- <available file="${include.dir}/private/apu_config.h" />
- <available file="${include.dir}/private/apu_select_dbm.h" />
- <available file="${src.dir}/xml/expat/lib/expat.h" />
- <available file="${src.dir}/xml/expat/config.h" />
- </and>
- </condition>
-</target>
-
-<target name="win-configure"
- depends="configure-check"
- if="is-windows"
- unless="aprutil-config-available">
- <copy tofile="${include.dir}/apu.h"
- file="${include.dir}/apu.hw"
- />
- <replaceregexp file="${include.dir}/apu.h"
- match="#define *APU_HAVE_APR_ICONV.*"
- replace="#define APU_HAVE_APR_ICONV 0"
- />
- <copy tofile="${include.dir}/apu_want.h"
- file="${include.dir}/apu_want.hw"
- />
- <copy tofile="${include.dir}/apr_ldap.h"
- file="${include.dir}/apr_ldap.hw"
- />
- <replaceregexp file="${include.dir}/apr_ldap.h"
- match="#define APR_HAS_LDAP.*"
- replace="#define APR_HAS_LDAP 0"
- />
- <copy tofile="${include.dir}/private/apu_config.h"
- file="${include.dir}/private/apu_config.hw"
- />
- <copy tofile="${include.dir}/private/apu_select_dbm.h"
- file="${include.dir}/private/apu_select_dbm.hw"
- />
- <copy tofile="${src.dir}/xml/expat/lib/config.h"
- file="${src.dir}/xml/expat/lib/winconfig.h"
- />
-
- <!--
- apr_dbd_odbc.c needs stdint.h, but at least on BCC it doesn't seem to be included
- automatically. It's easier to change that using a file we already create than changing core
- code files.
- -->
- <condition property="bcc-needs-stdint"
- value="1"
- else="0">
- <and>
- <equals arg1="${compiler}" arg2="bcc" />
- <not>
- <isfileselected file="${include.dir}/private/apu_config.h">
- <contains text="#include <stdint.h>"
- ignorewhitespace="true"
- />
- </isfileselected>
- </not>
- </and>
- </condition>
- <if>
- <equals arg1="${bcc-needs-stdint}"
- arg2="1"
- />
- <then>
- <replace file="${include.dir}/private/apu_config.h"
- token="#define APU_CONFIG_H">
- <replacevalue>#define APU_CONFIG_H
-
-#include <stdint.h>
- </replacevalue>
- </replace>
- </then>
- </if>
-</target>
-
-<target name="unix-configure"
- depends="configure-check, find-apr"
- if="is-unix"
- unless="aprutil-config-available">
- <exec executable="sh" dir="${src.dir}">
- <arg value="./configure" />
- <arg value="--with-apr=${apr.dir}" />
- </exec>
- <exec executable="sh" dir="${src.dir}/xml/expat">
- <arg value="./configure" />
- </exec>
-</target>
-
-<target name="configure"
- depends="unix-configure, win-configure">
- <condition property="has-iconv"
- value="1">
- <isfileselected file="${include.dir}/apu.h">
- <contains text="#define APR_HAVE_ICONV 1"
- ignorewhitespace="true"
- />
- </isfileselected>
- </condition>
- <condition property="has-iconv"
- value="1">
- <isfileselected file="${include.dir}/apu.h">
- <contains text="#define APU_HAVE_ICONV 1"
- ignorewhitespace="true"
- />
- </isfileselected>
- </condition>
- <condition property="has-sqlite3"
- value="1">
- <isfileselected file="${include.dir}/apu.h">
- <contains text="#define APU_HAVE_SQLITE3 1"
- ignorewhitespace="true"
- />
- </isfileselected>
- </condition>
-</target>
-
-<target name="build-xml"
- depends="configure"
- description="Builds Expat">
- <mkdir dir="${executable.dir}/apr-util-ofiles" />
- <property name="project.compiler"
- value="${compiler}"
- />
- <property name="project.type"
- value="msvc6"
- />
-
- <!--
- This only generate a project file necessary to mimic this visual studio project provided
- with APR.
- -->
- <cc name="${project.compiler}"
- outfile="${executable.dir}/expat"
- subsystem="console"
- multithreaded="true"
- runtime="${runtime}"
- outtype="static"
- objdir="${executable.dir}/apr-util-ofiles"
- warnings="none"
- debug="${debug}"
- projectsOnly="true">
- <fileset dir="${src.dir}/xml/expat/lib"
- includes="xmlparse.c xmlrole.c xmltok.c"
- />
- <fileset dir="${src.dir}/xml/expat/lib"
- includes="*.h"
- />
- <fileset dir="${src.dir}/xml/expat"
- includes="*.h"
- />
-
- <includepath path="${src.dir}/xml/expat/lib" />
- <includepath path="${src.dir}/xml/expat" />
-
- <defineset>
- <define name="XMLPARSEAPI" value=" " />
- </defineset>
- <defineset define="WIN32 COMPILED_FROM_DSP"
- if="is-windows"
- />
- <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
- if="is-gcc"
- />
- <compilerarg value="${pic-option}"
- if="pic-option"
- />
-
- <libset libs="cw32mt" if="is-bcc" />
- <project type="${project.type}"
- outfile="${projects.dir}/projects/xml"
- if="project.if">
- <comment>&license;</comment>
- </project>
- </cc>
-</target>
-
-<target name="build"
- depends="build-xml, find-apr"
- description="Build library">
- <property name="apr.lib.prefix"
- value=""
- />
- <property name="apr.lib.name"
- value="apr-1"
- />
- <property name="apr.lib.suffix"
- value=""
- />
-
- <cc name="${project.compiler}"
- outfile="${executable.dir}/aprutil-1${lib-suffix}"
- subsystem="console"
- multithreaded="true"
- runtime="${runtime}"
- outtype="${lib.type}"
- objdir="${executable.dir}/apr-util-ofiles"
- warnings="none"
- debug="${debug}"
- projectsOnly="${projectsOnly}">
- <fileset dir="${src.dir}" includes="**/*.c"
- excludes="test/*.c *.c ldap/*.c xml/expat/lib/*"
- />
- <fileset dir="${src.dir}/xml/expat/lib"
- includes="xmlparse.c xmlrole.c xmltok.c"
- />
- <fileset dir="${src.dir}/xml/expat/lib"
- includes="*.h"
- />
- <fileset dir="${src.dir}/xml/expat"
- includes="*.h"
- />
- <fileset dir="${include.dir}"
- includes="*.h"
- />
- <fileset dir="${include.dir}/private"
- includes="*.h"
- />
-
- <includepath path="${apr.include.dir}" />
- <includepath path="${include.dir}" />
- <includepath path="${include.dir}/private" />
- <includepath path="${src.dir}/xml/expat/lib" />
- <includepath path="${src.dir}/xml/expat" />
-
- <defineset define="APU_DECLARE_EXPORT"
- if="is-shared"
- />
- <defineset define="APU_DECLARE_STATIC"
- unless="is-shared"
- />
- <defineset define="APR_DECLARE_STATIC"
- unless="is-apr-shared"
- />
- <defineset define="XML_STATIC"
- unless="is-shared"
- />
- <defineset>
- <define name="XMLPARSEAPI" value=" " />
- </defineset>
- <defineset define="WIN32 COMPILED_FROM_DSP HAVE_SQL_H"
- if="is-windows"
- />
- <defineset if="is-bcc">
- <define name="EILSEQ"
- value="50"
- />
- </defineset>
- <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
- if="is-gcc"
- />
- <compilerarg value="${pic-option}"
- if="pic-option"
- />
-
- <libset dir="${executable.dir}"
- libs="xml ${apr.lib.prefix}${apr.lib.name}${apr.lib.suffix}"
- />
- <libset libs="cw32mt"
- if="is-bcc"
- />
- <libset libs="pthread dl"
- if="is-unix"
- />
- <libset libs="iconv"
- if="has-iconv"
- />
- <libset libs="sqlite3"
- if="has-sqlite3"
- />
-
- <project type="${project.type}"
- outfile="${projects.dir}/projects/aprutil"
- if="project.if">
- <comment>&license;</comment>
- <dependency file="${projects.dir}/apr" />
- </project>
- </cc>
-
- <property name="apr.lib.dir"
- location="${executable.dir}"
- />
-</target>
-
-<target name="build-test">
- <mkdir dir="${executable.dir}/apr-util-test-ofiles" />
- <property name="project.compiler"
- value="${compiler}"
- />
- <property name="project.type"
- value="msvc6"
- />
-
- <cc name="${project.compiler}"
- outfile="${executable.dir}/${test}"
- subsystem="console"
- multithreaded="true"
- runtime="${runtime}"
- outtype="executable"
- objdir="${executable.dir}/apr-util-test-ofiles"
- debug="${debug}"
- projectsOnly="${projectsOnly}">
- <fileset dir="${src.dir}/test"
- includes="${include.files}"
- excludes="${exclude.files}"
- />
-
- <includepath path="${include.dir}" />
- <includepath path="${apr.include.dir}" />
-
- <defineset define="APU_DECLARE_STATIC"
- unless="is-shared"
- />
- <defineset define="APR_DECLARE_STATIC"
- unless="is-apr-shared"
- />
- <defineset if="is-windows">
- <define name="WIN32" value="1" />
- </defineset>
- <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
- if="is-gcc"
- />
- <compilerarg value="${pic-option}"
- if="pic-option"
- />
-
- <libset dir="${apr.lib.dir}"
- libs="apr-1${lib-suffix}"
- if="apr.lib.dir"
- />
- <libset libs="apr-1${lib-suffix}"
- unless="apr.lib.dir"
- />
- <libset dir="${executable.dir}"
- libs="aprutil-1${lib-suffix}"
- />
- <libset libs="cw32mt"
- if="is-bcc"
- />
- <libset libs="pthread dl"
- if="is-unix"
- />
- <libset libs="iconv"
- if="has-iconv"
- />
- <libset libs="sqlite3"
- if="has-sqlite3"
- />
-
- <project type="${project.type}"
- outfile="${projects.dir}/projects/${test}"
- if="project.if">
- <comment>&license;</comment>
- <dependency file="${projects.dir}/apr" />
- <dependency file="${projects.dir}/aprutil" depends="apr" />
- </project>
- </cc>
-</target>
-
-<target name="copy-apr"
- if="is-windows">
- <copy todir="${executable.dir}"
- overwrite="true">
- <fileset dir="${apr.lib.dir}"
- includes="apr-1${lib-suffix}.dll"
- />
- </copy>
-</target>
-
-<target name="run-test"
- depends="copy-apr">
- <exec executable="${executable.dir}/${test}"
- dir="${executable.dir}"
- failonerror="true">
- <env key="DYLD_LIBRARY_PATH"
- value="${apr.lib.dir}:${aprutil.lib.dir}:${env.DYLD_LIBRARY_PATH}"
- />
- <env key="LD_LIBRARY_PATH"
- value="${apr.lib.dir}:${aprutil.lib.dir}:${env.LD_LIBRARY_PATH}"
- />
- <env key="Path"
- value="${apr.lib.dir}:${aprutil.lib.dir}:${env.Path}"
- />
- </exec>
-</target>
-
-<target name="build-testall"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="testall"
- />
- <param name="include.files"
- value="**/*.c"
- />
- <param name="exclude.files"
- value="dbd.c testssl.c echod.c sockperf.c nw*.c"
- />
- </antcall>
-</target>
-
-<target name="run-testall"
- depends="build-testall">
- <antcall target="run-test">
- <param name="test"
- value="testall"
- />
- </antcall>
-</target>
-
-<target name="build-dbd"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="dbd"
- />
- <param name="include.files"
- value="dbd.c"
- />
- <param name="exclude.files"
- value="*.y"
- />
- </antcall>
-</target>
-
-<target name="run-dbd"
- depends="build-dbd">
- <antcall target="run-test">
- <param name="test"
- value="dbd"
- />
- </antcall>
-</target>
-
-<target name="build-testssl"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="testssl"
- />
- <param name="include.files"
- value="testssl.c"
- />
- </antcall>
-</target>
-
-<target name="run-testssl"
- depends="build-testssl">
- <antcall target="run-test">
- <param name="test"
- value="testssl"
- />
- </antcall>
-</target>
-
-<target name="build-echod" depends="build">
- <antcall target="build-test">
- <param name="test"
- value="echod"
- />
- <param name="include.files"
- value="echod.c"
- />
- </antcall>
-</target>
-
-<target name="build-sockperf"
- depends="build">
- <antcall target="build-test">
- <param name="test"
- value="sockperf"
- />
- <param name="include.files"
- value="sockperf.c"
- />
- </antcall>
-</target>
-
-<target name="build-check"
- depends="build-testall, build-dbd, build-testssl, build-echod"
- description="Builds all tests"
-/>
-
-<target name="check"
- depends="build-check"
- description="Runs all tests"
-/>
-
-<target name="build-projects">
- <mkdir dir="${projects.dir}" />
- <antcall target="build">
- <param name="project.if"
- value="true"
- />
- <param name="project.type"
- value="${project.type}"
- />
- <param name="project.compiler"
- value="${project.compiler}"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="debug"
- value="${debug}"
- />
- <param name="projectsOnly"
- value="true"
- />
- </antcall>
-</target>
-
-<target name="build-projects-vc6"
- depends="init"
- description="Builds project files for Microsoft Visual C++ 6">
- <antcall target="build-projects">
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="project.type"
- value="msvc6"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="debug"
- value="${debug}"
- />
- </antcall>
-</target>
-
-<target name="build-projects-vc7"
- depends="init"
- description="Builds project files for Microsoft Visual Studio .NET">
- <antcall target="build-projects">
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="project.type"
- value="msvc7"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="debug"
- value="${debug}"
- />
- </antcall>
-</target>
-
-<target name="build-projects-vc8"
- depends="init"
- description="Builds project files for Microsoft Visual C++ 2005">
- <antcall target="build-projects">
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="project.type"
- value="msvc8"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="debug"
- value="${debug}"
- />
- </antcall>
-</target>
-
-<target name="build-projects-vc9"
- depends="init"
- description="Builds project files for Microsoft Visual C++ 2008">
- <antcall target="build-projects">
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="project.type"
- value="msvc9"
- />
- <param name="project.compiler"
- value="msvc"
- />
- <param name="os.family"
- value="windows"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="debug"
- value="${debug}"
- />
- </antcall>
-</target>
-
-<target name="build-projects-xcode"
- depends="init"
- description="Builds project files for Apple Xcode">
- <antcall target="build-projects">
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="project.type"
- value="xcode"
- />
- <param name="project.compiler"
- value="${compiler}"
- />
- <param name="os.family"
- value="mac"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="debug"
- value="${debug}"
- />
- </antcall>
-</target>
-
-</project>
diff --git a/src/ant/common.xml b/src/ant/common.xml
index 3343b3d..1f9f192 100644
--- a/src/ant/common.xml
+++ b/src/ant/common.xml
@@ -34,8 +34,6 @@
value="dynamic"
/>
-<taskdef resource="cpptasks.tasks" />
-<typedef resource="cpptasks.types" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
<target name="os-detect">
@@ -124,26 +122,6 @@
<target name="common-init"
depends="win-init, unix-init">
- <available classname="net.sf.antcontrib.cpptasks.CCTask"
- property="cctask-available" />
- <fail unless="cctask-available">cpptasks required
-
-Use cpptasks 1.0b5 or later from
-http://ant-contrib.sourceforge.net.
- </fail>
-
- <available classname="net.sf.antcontrib.cpptasks.ide.ProjectDef"
- property="cctask-project-available" />
- <!-- fail unless="cctask-project-available">later version of cpptasks required
-
-Required features not present in cpptasks releases prior to Feb 2005
- </fail -->
-
- <mkdir dir="${target.dir}" />
- <property name="projects.dir"
- value="${target.dir}"
- />
- <mkdir dir="${projects.dir}" />
<condition property="is-gcc"
value="true">
@@ -211,27 +189,6 @@ Required features not present in cpptasks releases prior to Feb 2005
<property name="projectsOnly"
value="false"
/>
-
- <property name="apr.lib.name"
- value="apr-1"
- />
- <property name="apr.sample.h"
- value="apr_pools.h"
- />
- <property name="apr.sample.c" value="file_io/unix/dir.c"
- />
- <property name="apr-util.lib.name" value="aprutil-1"
- />
- <property name="apr-util.sample.h" value="apr_xml.h"
- />
- <property name="apr-util.sample.c" value="xml/apr_xml.c"
- />
- <property name="esmtp.lib.name" value="esmtp"
- />
- <property name="esmtp.sample.h" value="libesmtp.h"
- />
- <property name="esmtp.sample.c" value="smtp-api.c"
- />
</target>
<target name="copy-if-changed-compare"
diff --git a/src/ant/esmtp-build.xml b/src/ant/esmtp-build.xml
deleted file mode 100644
index 3e7e63a..0000000
--- a/src/ant/esmtp-build.xml
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE project [
-<!ENTITY common SYSTEM 'common.xml'>
-]>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-<!--
- This file builds libesmtp using Apache Ant (http://ant.apache.org)
- and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
--->
-<project name="esmtp" default="build">
-
-&common;
-
-<property name="src.dir"
- location="${basedir}"
-/>
-<property name="include.dir"
- location="${src.dir}"
-/>
-<property name="test.dir"
- location="${src.dir}/test"
-/>
-<property name="target.dir"
- location="${basedir}/target"
-/>
-<property name="lib.type"
- value="shared"
-/>
-<property name="projects.dir"
- location="${target.dir}"
-/>
-
-<target name="usage"
- description="Displays usage notes on build">
- <echo></echo>
-</target>
-
-<target name="init"
- depends="common-init">
-</target>
-
-<target name="clean"
- description="Removes build product files">
- <delete dir="${target.dir}" />
-</target>
-
-<target name="configure-check"
- depends="init">
- <condition property="esmtp-configure-available"
- value="true">
- <available file="${include.dir}/config.h" />
- </condition>
-</target>
-
-<target name="win-configure"
- depends="configure-check"
- if="is-windows">
- <antcall target="copy-if-changed">
- <param name="file"
- value="${include.dir}/config.h.in"
- />
- <param name="tofile"
- value="${include.dir}/config.h"
- />
- </antcall>
-</target>
-
-<target name="unix-configure"
- depends="configure-check"
- if="is-unix"
- unless="esmtp-configure-available">
- <!-- Shelling to configure allows cygwin to work -->
- <exec executable="sh"
- dir="${src.dir}">
- <arg value="./configure" />
- </exec>
-</target>
-
-<target name="configure"
- depends="unix-configure, win-configure"
-/>
-
-<target name="build"
- depends="configure"
- description="Build library">
- <mkdir dir="${executable.dir}/libesmtp-ofiles" />
- <property name="project.compiler"
- value="${compiler}"
- />
-
- <cc name="${project.compiler}"
- outfile="${executable.dir}/esmtp${lib-suffix}"
- subsystem="console"
- multithreaded="true"
- outtype="${lib.type}"
- objdir="${executable.dir}/libesmtp-ofiles"
- outputfileproperty="esmtp.dll"
- debug="${debug}"
- projectsOnly="${projectsOnly}">
- <fileset dir="${src.dir}">
- <include name="*.c" />
- <exclude name="getaddrinfo.c" />
- <exclude name="gethostbyname.c" if="is-windows" />
- <exclude name="strdup.c" if="is-windows" />
- <exclude name="snprintf.c" if="is-windows" />
- <exclude name="auth-client.c" if="is-windows" />
- <!-- exclude name="siobuf.c" if="is-windows"/ -->
- </fileset>
-
- <includepath path="${include.dir}" />
- <defineset define="HAVE_CONFIG_H" />
- <compilerarg value="${pic-option}"
- if="pic-option"
- />
-
- <libset libs="advapi32 ws2_32 mswsock rpcrt4"
- if="is-windows"
- />
- <libset libs="ssl crypto"
- if="is-unix"
- />
- <libset libs="cw32mt"
- if="is-bcc"
- />
-
- <project type="${project.type}"
- outfile="${projects.dir}/projects/libesmtp"
- if="project.if"
- />
- </cc>
-</target>
-
-<target name="build-projects">
- <mkdir dir="${projects.dir}" />
- <antcall target="build">
- <param name="project.if"
- value="true"
- />
- <param name="project.type"
- value="${project.type}"
- />
- <param name="project.compiler"
- value="${project.compiler}"
- />
- <param name="projects.dir"
- value="${projects.dir}"
- />
- <param name="projectsOnly"
- value="true"
- />
- </antcall>
-</target>
-
-<target name="build-projects-vc6"
- description="Builds project files for Microsoft Visual C++ 6">
- <antcall target="build-projects">
- <param name="project.type"
- value="msvc6"
- />
- <param name="project.compiler"
- value="msvc"
- />
- </antcall>
-</target>
-
-<target name="build-projects-vc8"
- description="Builds project files for Microsoft Visual C++ 2005">
- <antcall target="build-projects">
- <param name="project.type"
- value="msvc8"
- />
- <param name="project.compiler"
- value="msvc"
- />
- </antcall>
-</target>
-
-<target name="build-projects-xcode"
- description="Builds project files for Apple Xcode">
- <antcall target="build-projects">
- <param name="project.type"
- value="xcode"
- />
- <param name="project.compiler"
- value="g++"
- />
- </antcall>
-</target>
-
-</project>
diff --git a/src/ant/find-apr-util.xml b/src/ant/find-apr-util.xml
deleted file mode 100644
index 10908ed..0000000
--- a/src/ant/find-apr-util.xml
+++ /dev/null
@@ -1,369 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-<target name="find-apr-util-src"
- depends="init">
- <condition property="apr-util.dir"
- value="${with-apr-util}">
- <available file="${with-apr-util}" />
- </condition>
- <condition property="apr-util.src.dir"
- value="${apr-util.dir}">
- <available file="${apr-util.dir}/${apr-util.sample.c}" />
- </condition>
- <condition property="apr-util.src.dir"
- value="../apr-util">
- <available file="../apr-util/${apr-util.sample.c}" />
- </condition>
-</target>
-
-<target name="find-apr-util-lib"
- depends="find-apr-util-src"
- unless="force-ant">
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/lib${apr-util.lib.name}.la">
- <available file="${apr-util.dir}/lib${apr-util.lib.name}.la" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/lib${apr-util.lib.name}.dylib">
- <available file="${apr-util.dir}/lib${apr-util.lib.name}.dylib" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/lib${apr-util.lib.name}.so">
- <available file="${apr-util.dir}/lib${apr-util.lib.name}.so" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/lib${apr-util.lib.name}.a">
- <available file="${apr-util.dir}/lib${apr-util.lib.name}.a" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/${apr-util.lib.name}.lib">
- <available file="${apr-util.dir}/${apr-util.lib.name}.lib" />
- </condition>
- <condition property="apr-util.lib.file.dir"
- value="${apr-util.dir}">
- <isset property="apr-util.lib.file" />
- </condition>
-
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la">
- <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib">
- <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so">
- <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a">
- <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/.libs/${apr-util.lib.name}.lib">
- <available file="${apr-util.dir}/.libs/${apr-util.lib.name}.lib" />
- </condition>
- <condition property="apr-util.lib.file.dir"
- value="${apr-util.dir}/.libs">
- <isset property="apr-util.lib.file" />
- </condition>
-
- <!-- Start looking at candidates in /usr -->
- <condition property="apr-util.lib.file"
- value="/usr/lib/lib${apr-util.lib.name}.la">
- <available file="/usr/lib/lib${apr-util.lib.name}.la" />
- </condition>
- <condition property="apr-util.lib.file"
- value="/usr/lib/lib${apr-util.lib.name}.dylib">
- <available file="/usr/lib/lib${apr-util.lib.name}.dylib" />
- </condition>
- <condition property="apr-util.lib.file"
- value="/usr/lib/lib${apr-util.lib.name}.so">
- <available file="/usr/lib/lib${apr-util.lib.name}.so" />
- </condition>
- <condition property="apr-util.lib.file"
- value="/usr/lib/lib${apr-util.lib.name}.a">
- <available file="/usr/lib/lib${apr-util.lib.name}.a" />
- </condition>
- <condition property="apr-util.dir" value="/usr">
- <isset property="apr-util.lib.file" />
- </condition>
- <condition property="apr-util.lib.file.dir" value="/usr/lib">
- <isset property="apr-util.lib.file" />
- </condition>
-
- <!-- start looking at candidates in /usr/local -->
- <condition property="apr-util.lib.file"
- value="/usr/local/lib/lib${apr-util.lib.name}.la">
- <available file="/usr/local/lib/lib${apr-util.lib.name}.la" />
- </condition>
- <condition property="apr-util.lib.file"
- value="/usr/local/lib/lib${apr-util.lib.name}.dylib">
- <available file="/usr/local/lib/lib${apr-util.lib.name}.dylib" />
- </condition>
- <condition property="apr-util.lib.file"
- value="/usr/local/lib/lib${apr-util.lib.name}.so">
- <available file="/usr/local/lib/lib${apr-util.lib.name}.so" />
- </condition>
- <condition property="apr-util.lib.file"
- value="/usr/local/lib/lib${apr-util.lib.name}.a">
- <available file="/usr/local/lib/lib${apr-util.lib.name}.a" />
- </condition>
- <condition property="apr-util.dir" value="/usr/local">
- <isset property="apr-util.lib.file" />
- </condition>
- <condition property="apr-util.lib.file.dir" value="/usr/local/lib">
- <isset property="apr-util.lib.file" />
- </condition>
-
- <property name="relative-apr-util"
- location="../apr-util"
- />
- <condition property="apr-util.dir"
- value="${relative-apr-util}">
- <available file="${relative-apr-util}" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/lib${apr-util.lib.name}.la">
- <available file="${apr-util.dir}/lib${apr-util.lib.name}.la" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/lib${apr-util.lib.name}.dylib">
- <available file="${apr-util.dir}/lib${apr-util.lib.name}.dylib" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/lib${apr-util.lib.name}.so">
- <available file="${apr-util.dir}/lib${apr-util.lib.name}.so" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/lib${apr-util.lib.name}.a">
- <available file="${apr-util.dir}/lib${apr-util.lib.name}.a" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/${apr-util.lib.name}.lib">
- <available file="${apr-util.dir}/${apr-util.lib.name}.lib" />
- </condition>
- <condition property="apr-util.lib.file.dir"
- value="${apr-util.dir}">
- <isset property="apr-util.lib.file" />
- </condition>
-
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la">
- <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib">
- <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so">
- <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so" />
- </condition>
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a">
- <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a" />
- </condition>
- <condition property="apr-util.lib.file.dir"
- value="${apr-util.dir}/.libs">
- <isset property="apr-util.lib.file" />
- </condition>
- <fail unless="apr-util.dir">Unable to locate apr-util base directory.</fail>
-
- <!-- Static debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/LibD/${apr-util.lib.name}.lib">
- <and>
- <isset property="is-debug" />
- <available file="${apr-util.dir}/LibD/${apr-util.lib.name}.lib" />
- </and>
- </condition>
- <condition property="apr-util.lib.file.dir"
- value="${apr-util.dir}/LibD">
- <isset property="apr-util.lib.file" />
- </condition>
-
- <!-- Shared debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/Debug/lib${apr-util.lib.name}.lib">
- <and>
- <isset property="is-debug" />
- <available file="${apr-util.dir}/Debug/lib${apr-util.lib.name}.lib" />
- </and>
- </condition>
- <condition property="apr-util.lib.file.dir"
- value="${apr-util.dir}/Debug">
- <isset property="apr-util.lib.file" />
- </condition>
-
- <!-- Static release libraries in APR's VC6 projects typical location (ignored unless debug build) -->
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/LibR/${apr-util.lib.name}.lib">
- <available file="${apr-util.dir}/LibR/${apr-util.lib.name}.lib" />
- </condition>
- <condition property="apr-util.lib.file.dir"
- value="${apr-util.dir}/LibR">
- <isset property="apr-util.lib.file" />
- </condition>
-
- <!-- Shared release libraries in APR's VC6 projects typical location -->
- <condition property="apr-util.lib.file"
- value="${apr-util.dir}/Release/lib${apr-util.lib.name}.lib">
- <available file="${apr-util.dir}/Release/lib${apr-util.lib.name}.lib" />
- </condition>
- <condition property="apr-util.lib.file.dir"
- value="${apr-util.dir}/Release">
- <isset property="apr-util.lib.file" />
- </condition>
-
- <condition property="apr-util.lib.dir"
- value="${apr-util.lib.file.dir}">
- <and>
- <isset property="apr-util.lib.file.dir" />
- <not>
- <or>
- <!-- default search path -->
- <equals arg1="${apr-util.lib.file.dir}" arg2="/usr" />
- </or>
- </not>
- </and>
- </condition>
-
- <condition property="apr-util.lib.suffix"
- value="d">
- <or>
- <contains string="${apr-util.lib.file}"
- substring="/lib${apr-util.lib.name}d."
- />
- <contains string="${apr-util.lib.file}"
- substring="/${apr-util.lib.name}d."
- />
- </or>
- </condition>
- <condition property="apr-util.lib.suffix"
- value="D">
- <or>
- <contains string="${apr-util.lib.file}"
- substring="/lib${apr-util.lib.name}D."
- />
- <contains string="${apr-util.lib.file}"
- substring="/${apr-util.lib.name}D."
- />
- </or>
- </condition>
- <condition property="apr-util.lib.suffix"
- value="">
- <isset property="apr-util.lib.file" />
- </condition>
-
- <condition property="apr-util.lib.prefix"
- value="lib">
- <or>
- <contains string="[${apr-util.lib.file}]"
- substring="/lib${apr-util.lib.name}.lib]"
- />
- </or>
- </condition>
- <condition property="apr-util.lib.prefix"
- value="">
- <isset property="apr-util.lib.file" />
- </condition>
-
- <condition property="apr-util.lib.type"
- value="shared">
- <or>
- <contains string="${apr-util.lib.file}]"
- substring=".dylib]"
- casesensitive="no"
- />
- <contains string="${apr-util.lib.file}]"
- substring=".so]"
- casesensitive="no"
- />
- <contains string="${apr-util.lib.file}]"
- substring=".la]"
- casesensitive="no"
- />
- <and>
- <!--
- If we have just a .lib, guess based on file size. Import libs should be much
- smaller.
- -->
- <contains string="${apr-util.lib.file}]"
- substring=".lib]"
- casesensitive="no"
- />
- <isfileselected file="${apr-util.lib.file}">
- <size value="250000" when="less" />
- </isfileselected>
- </and>
- </or>
- </condition>
-
- <condition property="apr-util.lib.type"
- value="static">
- <isset property="apr-util.lib.file" />
- </condition>
-</target>
-
-<target name="find-apr-util"
- depends="find-apr-util-lib">
- <!--
- Use character ref to prevent directory name from being changed on global search and
- replacements.
- -->
- <condition property="apr-util.include.dir"
- value="${apr-util.dir}/include/apr-1.0">
- <available file="${apr-util.dir}/include/apr-1.0/${apr-util.sample.h}" />
- </condition>
- <condition property="apr-util.include.dir"
- value="${apr-util.dir}/include/apr-1">
- <available file="${apr-util.dir}/include/apr-1/${apr-util.sample.h}" />
- </condition>
- <condition property="apr-util.include.dir"
- value="${apr-util.dir}/include">
- <available file="${apr-util.dir}/include/${apr-util.sample.h}" />
- </condition>
- <condition property="apr-util.include.dir"
- value="${apr-util.dir}/../usr/include/apr-1">
- <available file="${apr-util.dir}/../usr/include/apr-1/${apr-util.sample.h}" />
- </condition>
- <condition property="apr-util.include.dir"
- value="${apr-util.src.dir}/include">
- <available file="${apr-util.src.dir}/include/${apr-util.sample.h}" />
- </condition>
-
- <condition property="apr-util.dir"
- value="${apr-util.src.dir}">
- <isset property="apr-util.src.dir" />
- </condition>
-
- <echo>apr-util-find:
-apr-util.dir=${apr-util.dir}
-apr-util.include.dir=${apr-util.include.dir}
-apr-util.src.dir=${apr-util.src.dir}
-apr-util.lib.file=${apr-util.lib.file}
-apr-util.lib.file.dir=${apr-util.lib.file.dir}
-apr-util.lib.dir=${apr-util.lib.dir}
-apr-util.lib.prefix=${apr-util.lib.prefix}
-apr-util.lib.suffix=${apr-util.lib.suffix}
-apr-util.lib.type=${apr-util.lib.type}
- </echo>
-</target>
diff --git a/src/ant/find-apr.xml b/src/ant/find-apr.xml
deleted file mode 100644
index d29d7aa..0000000
--- a/src/ant/find-apr.xml
+++ /dev/null
@@ -1,370 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-<target name="find-apr-src"
- depends="init">
- <condition property="apr.dir"
- value="${with-apr}">
- <available file="${with-apr}" />
- </condition>
- <condition property="apr.src.dir"
- value="${apr.dir}">
- <available file="${apr.dir}/${apr.sample.c}" />
- </condition>
- <condition property="apr.src.dir"
- value="../apr">
- <available file="../apr/${apr.sample.c}" />
- </condition>
-</target>
-
-<target name="find-apr-lib"
- depends="find-apr-src"
- unless="force-ant">
- <condition property="apr.lib.file"
- value="${apr.dir}/lib${apr.lib.name}.la">
- <available file="${apr.dir}/lib${apr.lib.name}.la" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/lib${apr.lib.name}.dylib">
- <available file="${apr.dir}/lib${apr.lib.name}.dylib" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/lib${apr.lib.name}.so">
- <available file="${apr.dir}/lib${apr.lib.name}.so" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/lib${apr.lib.name}.a">
- <available file="${apr.dir}/lib${apr.lib.name}.a" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/${apr.lib.name}.lib">
- <available file="${apr.dir}/${apr.lib.name}.lib" />
- </condition>
- <condition property="apr.lib.file.dir"
- value="${apr.dir}">
- <isset property="apr.lib.file" />
- </condition>
-
- <condition property="apr.lib.file"
- value="${apr.dir}/.libs/lib${apr.lib.name}.la">
- <available file="${apr.dir}/.libs/lib${apr.lib.name}.la" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/.libs/lib${apr.lib.name}.dylib">
- <available file="${apr.dir}/.libs/lib${apr.lib.name}.dylib" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/.libs/lib${apr.lib.name}.so">
- <available file="${apr.dir}/.libs/lib${apr.lib.name}.so" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/.libs/lib${apr.lib.name}.a">
- <available file="${apr.dir}/.libs/lib${apr.lib.name}.a" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/.libs/${apr.lib.name}.lib">
- <available file="${apr.dir}/.libs/${apr.lib.name}.lib" />
- </condition>
- <condition property="apr.lib.file.dir"
- value="${apr.dir}/.libs">
- <isset property="apr.lib.file" />
- </condition>
-
- <!-- Start looking at candidates in /usr -->
- <condition property="apr.lib.file"
- value="/usr/lib/lib${apr.lib.name}.la">
- <available file="/usr/lib/lib${apr.lib.name}.la" />
- </condition>
- <condition property="apr.lib.file"
- value="/usr/lib/lib${apr.lib.name}.dylib">
- <available file="/usr/lib/lib${apr.lib.name}.dylib" />
- </condition>
- <condition property="apr.lib.file"
- value="/usr/lib/lib${apr.lib.name}.so">
- <available file="/usr/lib/lib${apr.lib.name}.so" />
- </condition>
- <condition property="apr.lib.file"
- value="/usr/lib/lib${apr.lib.name}.a">
- <available file="/usr/lib/lib${apr.lib.name}.a" />
- </condition>
- <condition property="apr.dir" value="/usr">
- <isset property="apr.lib.file" />
- </condition>
- <condition property="apr.lib.file.dir"
- value="/usr/lib">
- <isset property="apr.lib.file" />
- </condition>
-
- <!-- start looking at candidates in /usr/local -->
- <condition property="apr.lib.file"
- value="/usr/local/lib/lib${apr.lib.name}.la">
- <available file="/usr/local/lib/lib${apr.lib.name}.la" />
- </condition>
- <condition property="apr.lib.file"
- value="/usr/local/lib/lib${apr.lib.name}.dylib">
- <available file="/usr/local/lib/lib${apr.lib.name}.dylib" />
- </condition>
- <condition property="apr.lib.file"
- value="/usr/local/lib/lib${apr.lib.name}.so">
- <available file="/usr/local/lib/lib${apr.lib.name}.so" />
- </condition>
- <condition property="apr.lib.file"
- value="/usr/local/lib/lib${apr.lib.name}.a">
- <available file="/usr/local/lib/lib${apr.lib.name}.a" />
- </condition>
- <condition property="apr.dir"
- value="/usr/local">
- <isset property="apr.lib.file" />
- </condition>
- <condition property="apr.lib.file.dir"
- value="/usr/local/lib">
- <isset property="apr.lib.file" />
- </condition>
-
- <property name="relative-apr"
- location="../apr"
- />
- <condition property="apr.dir"
- value="${relative-apr}">
- <available file="${relative-apr}" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/lib${apr.lib.name}.la">
- <available file="${apr.dir}/lib${apr.lib.name}.la" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/lib${apr.lib.name}.dylib">
- <available file="${apr.dir}/lib${apr.lib.name}.dylib" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/lib${apr.lib.name}.so">
- <available file="${apr.dir}/lib${apr.lib.name}.so" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/lib${apr.lib.name}.a">
- <available file="${apr.dir}/lib${apr.lib.name}.a" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/${apr.lib.name}.lib">
- <available file="${apr.dir}/${apr.lib.name}.lib" />
- </condition>
- <condition property="apr.lib.file.dir" value="${apr.dir}">
- <isset property="apr.lib.file" />
- </condition>
-
- <condition property="apr.lib.file"
- value="${apr.dir}/.libs/lib${apr.lib.name}.la">
- <available file="${apr.dir}/.libs/lib${apr.lib.name}.la" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/.libs/lib${apr.lib.name}.dylib">
- <available file="${apr.dir}/.libs/lib${apr.lib.name}.dylib" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/.libs/lib${apr.lib.name}.so">
- <available file="${apr.dir}/.libs/lib${apr.lib.name}.so" />
- </condition>
- <condition property="apr.lib.file"
- value="${apr.dir}/.libs/lib${apr.lib.name}.a">
- <available file="${apr.dir}/.libs/lib${apr.lib.name}.a" />
- </condition>
- <condition property="apr.lib.file.dir" value="${apr.dir}/.libs">
- <isset property="apr.lib.file" />
- </condition>
- <fail unless="apr.dir">Unable to locate apr base directory.</fail>
-
- <!-- Static debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->
- <condition property="apr.lib.file"
- value="${apr.dir}/LibD/${apr.lib.name}.lib">
- <and>
- <isset property="is-debug" />
- <available file="${apr.dir}/LibD/${apr.lib.name}.lib" />
- </and>
- </condition>
- <condition property="apr.lib.file.dir"
- value="${apr.dir}/LibD">
- <isset property="apr.lib.file" />
- </condition>
-
- <!-- Shared debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->
- <condition property="apr.lib.file"
- value="${apr.dir}/Debug/lib${apr.lib.name}.lib">
- <and>
- <isset property="is-debug" />
- <available file="${apr.dir}/Debug/lib${apr.lib.name}.lib" />
- </and>
- </condition>
- <condition property="apr.lib.file.dir"
- value="${apr.dir}/Debug">
- <isset property="apr.lib.file" />
- </condition>
-
- <!-- Static release libraries in APR's VC6 projects typical location (ignored unless debug build) -->
- <condition property="apr.lib.file"
- value="${apr.dir}/LibR/${apr.lib.name}.lib">
- <available file="${apr.dir}/LibR/${apr.lib.name}.lib" />
- </condition>
- <condition property="apr.lib.file.dir"
- value="${apr.dir}/LibR">
- <isset property="apr.lib.file" />
- </condition>
-
- <!-- Shared release libraries in APR's VC6 projects typical location -->
- <condition property="apr.lib.file"
- value="${apr.dir}/Release/lib${apr.lib.name}.lib">
- <available file="${apr.dir}/Release/lib${apr.lib.name}.lib" />
- </condition>
- <condition property="apr.lib.file.dir"
- value="${apr.dir}/Release">
- <isset property="apr.lib.file" />
- </condition>
-
- <condition property="apr.lib.dir"
- value="${apr.lib.file.dir}">
- <and>
- <isset property="apr.lib.file.dir" />
- <not>
- <or>
- <!-- default search path -->
- <equals arg1="${apr.lib.file.dir}" arg2="/usr" />
- </or>
- </not>
- </and>
- </condition>
-
- <condition property="apr.lib.suffix"
- value="d">
- <or>
- <contains string="${apr.lib.file}"
- substring="/lib${apr.lib.name}d."
- />
- <contains string="${apr.lib.file}"
- substring="/${apr.lib.name}d."
- />
- </or>
- </condition>
- <condition property="apr.lib.suffix"
- value="D">
- <or>
- <contains string="${apr.lib.file}"
- substring="/lib${apr.lib.name}D."
- />
- <contains string="${apr.lib.file}"
- substring="/${apr.lib.name}D."
- />
- </or>
- </condition>
- <condition property="apr.lib.suffix"
- value="">
- <isset property="apr.lib.file" />
- </condition>
-
- <condition property="apr.lib.prefix"
- value="lib">
- <or>
- <contains string="[${apr.lib.file}]"
- substring="/lib${apr.lib.name}.lib]"
- />
- </or>
- </condition>
- <condition property="apr.lib.prefix"
- value="">
- <isset property="apr.lib.file" />
- </condition>
-
- <condition property="apr.lib.type"
- value="shared">
- <or>
- <contains string="${apr.lib.file}]"
- substring=".dylib]"
- casesensitive="no"
- />
- <contains string="${apr.lib.file}]"
- substring=".so]"
- casesensitive="no"
- />
- <contains string="${apr.lib.file}]"
- substring=".la]"
- casesensitive="no"
- />
- <and>
- <!--
- If we have just a .lib, guess based on file size. Import libs should be much
- smaller.
- -->
- <contains string="${apr.lib.file}]"
- substring=".lib]"
- casesensitive="no"
- />
- <isfileselected file="${apr.lib.file}">
- <size value="250000" when="less" />
- </isfileselected>
- </and>
- </or>
- </condition>
-
- <condition property="apr.lib.type"
- value="static">
- <isset property="apr.lib.file" />
- </condition>
-</target>
-
-<target name="find-apr"
- depends="find-apr-lib">
- <!--
- Use character ref to prevent directory name from being changed on global search and
- replacements.
- -->
- <condition property="apr.include.dir"
- value="${apr.dir}/include/apr-1.0">
- <available file="${apr.dir}/include/apr-1.0/${apr.sample.h}" />
- </condition>
- <condition property="apr.include.dir"
- value="${apr.dir}/include/apr-1">
- <available file="${apr.dir}/include/apr-1/${apr.sample.h}" />
- </condition>
- <condition property="apr.include.dir"
- value="${apr.dir}/include">
- <available file="${apr.dir}/include/${apr.sample.h}" />
- </condition>
- <condition property="apr.include.dir"
- value="${apr.dir}/../usr/include/apr-1">
- <available file="${apr.dir}/../usr/include/apr-1/${apr.sample.h}" />
- </condition>
- <condition property="apr.include.dir"
- value="${apr.src.dir}/include">
- <available file="${apr.src.dir}/include/${apr.sample.h}" />
- </condition>
-
- <condition property="apr.dir"
- value="${apr.src.dir}">
- <isset property="apr.src.dir" />
- </condition>
-
- <echo>apr-find:
-apr.dir=${apr.dir}
-apr.include.dir=${apr.include.dir}
-apr.src.dir=${apr.src.dir}
-apr.lib.file=${apr.lib.file}
-apr.lib.file.dir=${apr.lib.file.dir}
-apr.lib.dir=${apr.lib.dir}
-apr.lib.prefix=${apr.lib.prefix}
-apr.lib.suffix=${apr.lib.suffix}
-apr.lib.type=${apr.lib.type}
- </echo>
-</target>
diff --git a/src/ant/find-libesmtp.xml b/src/ant/find-libesmtp.xml
deleted file mode 100644
index 2767658..0000000
--- a/src/ant/find-libesmtp.xml
+++ /dev/null
@@ -1,363 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-<target name="find-esmtp-src"
- depends="init">
- <condition property="esmtp.dir" value="${with-libesmtp}">
- <available file="${with-libesmtp}" />
- </condition>
- <condition property="esmtp.src.dir" value="${esmtp.dir}">
- <available file="${esmtp.dir}/${esmtp.sample.c}" />
- </condition>
- <condition property="esmtp.src.dir" value="../libesmtp">
- <available file="../libesmtp/${esmtp.sample.c}" />
- </condition>
-</target>
-
-<target name="find-esmtp-lib"
- depends="find-esmtp-src"
- if="has-libesmtp"
- unless="force-ant">
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/lib${esmtp.lib.name}.la">
- <available file="${esmtp.dir}/lib${esmtp.lib.name}.la" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/lib${esmtp.lib.name}.dylib">
- <available file="${esmtp.dir}/lib${esmtp.lib.name}.dylib" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/lib${esmtp.lib.name}.so">
- <available file="${esmtp.dir}/lib${esmtp.lib.name}.so" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/lib${esmtp.lib.name}.a">
- <available file="${esmtp.dir}/lib${esmtp.lib.name}.a" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/${esmtp.lib.name}.lib">
- <available file="${esmtp.dir}/${esmtp.lib.name}.lib" />
- </condition>
- <condition property="esmtp.lib.file.dir"
- value="${esmtp.dir}">
- <isset property="esmtp.lib.file" />
- </condition>
-
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la">
- <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib">
- <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so">
- <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a">
- <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/.libs/${esmtp.lib.name}.lib">
- <available file="${esmtp.dir}/.libs/${esmtp.lib.name}.lib" />
- </condition>
- <condition property="esmtp.lib.file.dir" value="${esmtp.dir}/.libs">
- <isset property="esmtp.lib.file" />
- </condition>
-
- <!-- Start looking at candidates in /usr -->
- <condition property="esmtp.lib.file"
- value="/usr/lib/lib${esmtp.lib.name}.la">
- <available file="/usr/lib/lib${esmtp.lib.name}.la" />
- </condition>
- <condition property="esmtp.lib.file"
- value="/usr/lib/lib${esmtp.lib.name}.dylib">
- <available file="/usr/lib/lib${esmtp.lib.name}.dylib" />
- </condition>
- <condition property="esmtp.lib.file"
- value="/usr/lib/lib${esmtp.lib.name}.so">
- <available file="/usr/lib/lib${esmtp.lib.name}.so" />
- </condition>
- <condition property="esmtp.lib.file"
- value="/usr/lib/lib${esmtp.lib.name}.a">
- <available file="/usr/lib/lib${esmtp.lib.name}.a" />
- </condition>
- <condition property="esmtp.dir" value="/usr">
- <isset property="esmtp.lib.file" />
- </condition>
- <condition property="esmtp.lib.file.dir" value="/usr/lib">
- <isset property="esmtp.lib.file" />
- </condition>
-
- <!-- Start looking at candidates in /usr/local -->
- <condition property="esmtp.lib.file"
- value="/usr/local/lib/lib${esmtp.lib.name}.la">
- <available file="/usr/local/lib/lib${esmtp.lib.name}.la" />
- </condition>
- <condition property="esmtp.lib.file"
- value="/usr/local/lib/lib${esmtp.lib.name}.dylib">
- <available file="/usr/local/lib/lib${esmtp.lib.name}.dylib" />
- </condition>
- <condition property="esmtp.lib.file"
- value="/usr/local/lib/lib${esmtp.lib.name}.so">
- <available file="/usr/local/lib/lib${esmtp.lib.name}.so" />
- </condition>
- <condition property="esmtp.lib.file"
- value="/usr/local/lib/lib${esmtp.lib.name}.a">
- <available file="/usr/local/lib/lib${esmtp.lib.name}.a" />
- </condition>
- <condition property="esmtp.dir" value="/usr/local">
- <isset property="esmtp.lib.file" />
- </condition>
- <condition property="esmtp.lib.file.dir" value="/usr/local/lib">
- <isset property="esmtp.lib.file" />
- </condition>
-
- <property name="relative-esmtp"
- location="../libesmtp"
- />
- <condition property="esmtp.dir" value="${relative-esmtp}">
- <available file="${relative-esmtp}" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/lib${esmtp.lib.name}.la">
- <available file="${esmtp.dir}/lib${esmtp.lib.name}.la" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/lib${esmtp.lib.name}.dylib">
- <available file="${esmtp.dir}/lib${esmtp.lib.name}.dylib" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/lib${esmtp.lib.name}.so">
- <available file="${esmtp.dir}/lib${esmtp.lib.name}.so" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/lib${esmtp.lib.name}.a">
- <available file="${esmtp.dir}/lib${esmtp.lib.name}.a" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/${esmtp.lib.name}.lib">
- <available file="${esmtp.dir}/${esmtp.lib.name}.lib" />
- </condition>
- <condition property="esmtp.lib.file.dir" value="${esmtp.dir}">
- <isset property="esmtp.lib.file" />
- </condition>
-
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la">
- <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib">
- <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so">
- <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so" />
- </condition>
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a">
- <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a" />
- </condition>
- <condition property="esmtp.lib.file.dir" value="${esmtp.dir}/.libs">
- <isset property="esmtp.lib.file" />
- </condition>
- <fail unless="esmtp.dir">Unable to locate esmtp base directory.</fail>
-
- <!-- Static debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/LibD/${esmtp.lib.name}.lib">
- <and>
- <isset property="is-debug" />
- <available file="${esmtp.dir}/LibD/${esmtp.lib.name}.lib" />
- </and>
- </condition>
- <condition property="esmtp.lib.file.dir"
- value="${esmtp.dir}/LibD">
- <isset property="esmtp.lib.file" />
- </condition>
-
- <!-- Shared debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/Debug/lib${esmtp.lib.name}.lib">
- <and>
- <isset property="is-debug" />
- <available file="${esmtp.dir}/Debug/lib${esmtp.lib.name}.lib" />
- </and>
- </condition>
- <condition property="esmtp.lib.file.dir"
- value="${esmtp.dir}/Debug">
- <isset property="esmtp.lib.file" />
- </condition>
-
- <!-- Static release libraries in APR's VC6 projects typical location (ignored unless debug build) -->
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/LibR/${esmtp.lib.name}.lib">
- <available file="${esmtp.dir}/LibR/${esmtp.lib.name}.lib" />
- </condition>
- <condition property="esmtp.lib.file.dir"
- value="${esmtp.dir}/LibR">
- <isset property="esmtp.lib.file" />
- </condition>
-
- <!-- Shared release libraries in APR's VC6 projects typical location -->
- <condition property="esmtp.lib.file"
- value="${esmtp.dir}/Release/lib${esmtp.lib.name}.lib">
- <available file="${esmtp.dir}/Release/lib${esmtp.lib.name}.lib" />
- </condition>
- <condition property="esmtp.lib.file.dir"
- value="${esmtp.dir}/Release">
- <isset property="esmtp.lib.file" />
- </condition>
-
- <condition property="esmtp.lib.dir"
- value="${esmtp.lib.file.dir}">
- <and>
- <isset property="esmtp.lib.file.dir" />
- <not>
- <or>
- <!-- default search path -->
- <equals arg1="${esmtp.lib.file.dir}" arg2="/usr" />
- </or>
- </not>
- </and>
- </condition>
-
- <condition property="esmtp.lib.suffix"
- value="d">
- <or>
- <contains string="${esmtp.lib.file}"
- substring="/lib${esmtp.lib.name}d."
- />
- <contains string="${esmtp.lib.file}"
- substring="/${esmtp.lib.name}d."
- />
- </or>
- </condition>
- <condition property="esmtp.lib.suffix"
- value="D">
- <or>
- <contains string="${esmtp.lib.file}"
- substring="/lib${esmtp.lib.name}D."
- />
- <contains string="${esmtp.lib.file}"
- substring="/${esmtp.lib.name}D."
- />
- </or>
- </condition>
- <condition property="esmtp.lib.suffix"
- value="">
- <isset property="esmtp.lib.file" />
- </condition>
-
- <condition property="esmtp.lib.prefix"
- value="lib">
- <or>
- <contains string="[${esmtp.lib.file}]"
- substring="/lib${esmtp.lib.name}.lib]"
- />
- </or>
- </condition>
- <condition property="esmtp.lib.prefix"
- value="">
- <isset property="esmtp.lib.file" />
- </condition>
-
- <condition property="esmtp.lib.type"
- value="shared">
- <or>
- <contains string="${esmtp.lib.file}]"
- substring=".dylib]"
- casesensitive="no"
- />
- <contains string="${esmtp.lib.file}]"
- substring=".so]"
- casesensitive="no"
- />
- <contains string="${esmtp.lib.file}]"
- substring=".la]"
- casesensitive="no"
- />
- <and>
- <!--
- If we have just a .lib, guess based on file size. Import libs should be much
- smaller.
- -->
- <contains string="${esmtp.lib.file}]"
- substring=".lib]"
- casesensitive="no"
- />
- <isfileselected file="${esmtp.lib.file}">
- <size value="250000" when="less" />
- </isfileselected>
- </and>
- </or>
- </condition>
-
- <condition property="esmtp.lib.type"
- value="static">
- <isset property="esmtp.lib.file" />
- </condition>
-</target>
-
-<target name="find-esmtp"
- depends="find-esmtp-lib">
- <!--
- Use character ref to prevent directory name from being changed on global search and
- replacements.
- -->
- <condition property="esmtp.include.dir"
- value="${esmtp.dir}/include">
- <available file="${esmtp.dir}/include/${esmtp.sample.h}" />
- </condition>
- <condition property="esmtp.include.dir"
- value="${esmtp.dir}">
- <available file="${esmtp.dir}/${esmtp.sample.h}" />
- </condition>
- <condition property="esmtp.include.dir"
- value="${esmtp.dir}/../usr/include">
- <available file="${esmtp.dir}/../usr/include/${esmtp.sample.h}" />
- </condition>
- <condition property="esmtp.include.dir"
- value="${esmtp.src.dir}/include">
- <available file="${esmtp.src.dir}/include/${esmtp.sample.h}" />
- </condition>
- <condition property="esmtp.include.dir"
- value="${esmtp.src.dir}">
- <available file="${esmtp.src.dir}/include/${esmtp.sample.h}" />
- </condition>
-
- <condition property="esmtp.dir"
- value="${esmtp.src.dir}">
- <isset property="esmtp.src.dir" />
- </condition>
-
- <echo>esmtp-find:
-esmtp.dir=${esmtp.dir}
-esmtp.include.dir=${esmtp.include.dir}
-esmtp.src.dir=${esmtp.src.dir}
-esmtp.lib.file=${esmtp.lib.file}
-esmtp.lib.file.dir=${esmtp.lib.file.dir}
-esmtp.lib.dir=${esmtp.lib.dir}
-esmtp.lib.prefix=${esmtp.lib.prefix}
-esmtp.lib.suffix=${esmtp.lib.suffix}
-esmtp.lib.type=${esmtp.lib.type}
- </echo>
-</target>
\ No newline at end of file
diff --git a/src/assembly/source.xml b/src/assembly/source.xml
index 063d336..860fb2e 100644
--- a/src/assembly/source.xml
+++ b/src/assembly/source.xml
@@ -45,6 +45,7 @@
<includes>
<include>aclocal.m4</include>
<include>build.xml</include>
+ <include>CMakeLists.txt</include>
<include>configure.ac</include>
<include>config.guess</include>
<include>config.sub</include>
@@ -104,48 +105,6 @@
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>
-
- <!--
- Special handling for project files.
-
- Project files are generated in the target directory and contain relative paths out of that dir
- into the project's src dir and that of apr. Those relative paths stay valid only if those files
- are placed in the same hierarchy level in the release archive. If the files are generated in a
- different level, the placement in the release archive needs to be adopted and vice versa. That's
- why the release archive structure is not replicated in the target directory, we need to stay
- with two levels, but that allows us to keep the target dir somewhat clean and provide a logical
- structure in the release archive.
- -->
- <fileSet>
- <directory>target/projects</directory>
- <lineEnding>keep</lineEnding>
- <outputDirectory>projects/vc6</outputDirectory>
-
- <includes>
- <include>*.dsp</include>
- <include>*.dsw</include>
- </includes>
-
- <excludes>
- <exclude>apr*.ds*</exclude>
- <exclude>xml.ds*</exclude>
- </excludes>
-
- <fileMode>0644</fileMode>
- </fileSet>
-
- <fileSet>
- <directory>target/projects</directory>
- <lineEnding>keep</lineEnding>
- <outputDirectory>projects/xcode</outputDirectory>
-
- <includes>
- <include>*.xcodeproj/project.pbxproj</include>
- </includes>
-
- <fileMode>0644</fileMode>
- <directoryMode>0755</directoryMode>
- </fileSet>
</fileSets>
</assembly>
diff --git a/src/site/apt/building/cmake.apt b/src/site/apt/building/cmake.apt
new file mode 100644
index 0000000..1ebc303
--- /dev/null
+++ b/src/site/apt/building/cmake.apt
@@ -0,0 +1,75 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one or more
+~~ contributor license agreements. See the NOTICE file distributed with
+~~ this work for additional information regarding copyright ownership.
+~~ The ASF licenses this file to You under the Apache License, Version 2.0
+~~ (the "License"); you may not use this file except in compliance with
+~~ the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+ ------
+ Building Apache log4cxx with CMake
+ ------
+ ------
+ ------
+
+Building Apache log4cxx with cmake
+
+* Quick start:
+
+ Make sure cmake 3.13+, g++ and make are available, install or
+ build apr 1.x, apr-util 1.x, gzip and zip.
+
++------------+
+$ apt-get install build-essential libapr1-dev libaprutil1-dev gzip zip
+$ cd apache-log4cxx-x.x.x
+$ mkdir build
+$ cd build
+$ ccmake ..
+$ make
+$ sudo make install
++------------+
+
+* ccmake options
+*------------------------+---------------------------------------------------------------------------------------------+
+| -DLOG4CXX_WCHAR_T=no | Enable wchar_t API methods, choice of yes (default), no. |
+*------------------------+---------------------------------------------------------------------------------------------+
+| -DLOG4CXX_UNICHAR=yes | Enable UniChar API methods, choice of yes, no (default). |
+*------------------------+---------------------------------------------------------------------------------------------+
+| -DLOG4CXX_CFSTRING=yes | Enable CFString API methods, requires Mac OS/X CoreFoundation, choice of yes, no (default). |
+*------------------------+---------------------------------------------------------------------------------------------+
+
+* Platform specific notes:
+
+** Mac OS/X:
+
+ APR and APR-Util are provided by the platform in Mac OS/X 10.5 and iODBC in 10.4.
+
+** Debian:
+
+ APR, APR-Util, gzip and zip may be installed by:
+
++----+
+$ sudo apt-get install libapr1-dev libaprutil1-dev gzip zip
++----+
+
+** FreeBSD:
+
+ APR, APR-Util, gzip and zip may be installed from the ports collection by:
+
++----+
+# cd /usr/ports/archivers/zip
+# make
+# make install
+# cd /usr/ports/archivers/gzip
+# make
+# make install
+# cd /usr/ports/devel/apr
+# make
+# make install
++----+
diff --git a/src/site/apt/building/vcpkg.apt b/src/site/apt/building/vcpkg.apt
new file mode 100644
index 0000000..e7eff5f
--- /dev/null
+++ b/src/site/apt/building/vcpkg.apt
@@ -0,0 +1,41 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one or more
+~~ contributor license agreements. See the NOTICE file distributed with
+~~ this work for additional information regarding copyright ownership.
+~~ The ASF licenses this file to You under the Apache License, Version 2.0
+~~ (the "License"); you may not use this file except in compliance with
+~~ the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+ ------
+ Building Apache log4cxx with vcpkg
+ ------
+ ------
+ ------
+
+Building Apache log4cxx with vcpkg
+
+*Preparation
+
++----+
+ > git clone https://github.com/Microsoft/vcpkg.git
+ > cd vcpkg
+
+ PS> .\bootstrap-vcpkg.bat
+ Linux:~/$ ./bootstrap-vcpkg.sh
+
+ Then, to hook up user-wide integration, run (note: requires admin on first use)
+
+ PS> .\vcpkg integrate install
+ Linux:~/$ ./vcpkg integrate install
++----+
+
+*Building log4cxx.dll
+
+ PS> .\vcpkg install log4cxx
+ Linux:~/$ ./vcpkg install log4cxx
diff --git a/src/site/site.xml b/src/site/site.xml
index c33ae73..6941262 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -111,17 +111,14 @@
<item name="autotools"
href="/building/autotools.html"
/>
- <item name="Apache Ant"
- href="/building/ant.html"
- />
<item name="Apache Maven 2"
href="/building/maven.html"
/>
- <item name="Microsoft Visual Studio"
- href="/building/vstudio.html"
+ <item name="Microsoft vcpkg"
+ href="/building/vcpkg.html"
/>
- <item name="Apple Xcode"
- href="/building/xcode.html"
+ <item name="CMake"
+ href="/building/cmake.html"
/>
</item>
</menu>
[logging-log4cxx] 12/49: Merge branch 'master' of
https://github.com/apache/logging-log4cxx
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 704a80fd800953e86a13ab6890ec556e1125847c
Merge: e5f8af1 ed1e4b4
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Fri Jan 31 17:26:36 2020 +1100
Merge branch 'master' of https://github.com/apache/logging-log4cxx
.editorconfig | 19 ++
autogen.sh | 4 +-
configure-aprutil.bat | 15 +-
configure.bat | 8 +-
release_perform.sh | 15 +-
release_prepare.sh | 4 +-
release_purge.sh | 6 +-
src/changes/changes.xml | 1 +
src/main/cpp/Makefile.am | 1 +
src/main/cpp/jsonlayout.cpp | 389 +++++++++++++++++++++++++++
src/main/include/log4cxx/Makefile.am | 1 +
src/main/include/log4cxx/jsonlayout.h | 139 ++++++++++
src/test/cpp/Makefile.am | 1 +
src/test/cpp/jsonlayouttest.cpp | 481 ++++++++++++++++++++++++++++++++++
14 files changed, 1058 insertions(+), 26 deletions(-)
[logging-log4cxx] 23/49: Fix some test case failures
Posted by ts...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch ghpr_14_replace-ant-build-with-cmake
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 08d6176429ecfe902158ba0479f2b4e05b28139a
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Sat Feb 1 10:19:17 2020 +1100
Fix some test case failures
---
src/test/cpp/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index 7a0ada9..1f632d9 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -54,6 +54,7 @@ foreach(testName IN LISTS ALL_LOG4CXX_TESTS)
add_test(NAME ${testName}
COMMAND ${testName} -v
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../resources
+ ENVIRONMENT "TOTO=wonderful;key1=value1;key2=value2"
)
if(WIN32)
set_tests_properties(${testName} PROPERTIES ENVIRONMENT