From 2425d74b4b294ca10225a7d95d951b5abd4ad87f Mon Sep 17 00:00:00 2001 From: Robert Middleton Date: Sun, 9 Feb 2020 10:32:07 -0500 Subject: [PATCH 1/3] Add configuration summary --- CMakeLists.txt | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2809445e0..1d11b7fca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,3 +61,43 @@ install(EXPORT log4cxxTargets NAMESPACE log4cxx:: DESTINATION share/cmake/log4cxx ) + +# +# Get the varaibles from the subdirectories +# +get_directory_property( HAS_LIBESMTP DIRECTORY src/main/include DEFINITION HAS_LIBESMTP ) +get_directory_property( HAS_ODBC DIRECTORY src/main/include DEFINITION HAS_ODBC ) +get_directory_property( HAS_SYSLOG DIRECTORY src/main/include DEFINITION HAS_SYSLOG ) + +foreach(varName HAS_STD_LOCALE HAS_ODBC HAS_MBSRTOWCS HAS_WCSTOMBS HAS_FWIDE HAS_LIBESMTP HAS_SYSLOG) + if(${varName} EQUAL 0) + set(${varName} "OFF" ) + elseif(${varName} EQUAL 1) + set(${varName} "ON" ) + else() + set(${varName} "UNKNOWN" ) + endif() +endforeach() + +# +# Output configuration information +# Similar to APR CMake configuration +# +message(STATUS "") +message(STATUS "") +message(STATUS "log4cxx configuration summary:") +message(STATUS "") + +message(STATUS " Build type ...................... : ${CMAKE_BUILD_TYPE}") +message(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}") +message(STATUS " C++ compiler .................... : ${CMAKE_CXX_COMPILER}") +message(STATUS " log4cxx char API ................ : ${LOG4CXX_CHAR}") +message(STATUS " log4cxx wchar API ............... : ${LOG4CXX_WCHAR_T}") +message(STATUS " log4cxx unichar API ............. : ${LOG4CXX_UNICHAR}") +if(APPLE) +message(STATUS " log4cxx cfstring API ............ : ${LOG4CXX_CFSTRING}") +endif() +message(STATUS " logchar type .................... : ${LOG4CXX_CHAR}") +message(STATUS " Using libESMTP .................. : ${HAS_LIBESMTP}") +message(STATUS " ODBC library .................... : ${HAS_ODBC}") +message(STATUS " syslog .......................... : ${HAS_SYSLOG}") From 397e48f850c5ac406e0f0b29d9a9c36c442f63cb Mon Sep 17 00:00:00 2001 From: Robert Middleton Date: Sun, 9 Feb 2020 10:35:17 -0500 Subject: [PATCH 2/3] Output to the user if we are building tests --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d11b7fca..51a9c5af7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,7 @@ message(STATUS "log4cxx configuration summary:") message(STATUS "") message(STATUS " Build type ...................... : ${CMAKE_BUILD_TYPE}") +message(STATUS " Build tests ..................... : ${BUILD_TESTING}") message(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}") message(STATUS " C++ compiler .................... : ${CMAKE_CXX_COMPILER}") message(STATUS " log4cxx char API ................ : ${LOG4CXX_CHAR}") From 8eca44fcf9dfd94779186a12f01a27f59c64df87 Mon Sep 17 00:00:00 2001 From: Robert Middleton Date: Sun, 9 Feb 2020 10:38:50 -0500 Subject: [PATCH 3/3] Document how to disable tests --- src/site/apt/building/cmake.apt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/site/apt/building/cmake.apt b/src/site/apt/building/cmake.apt index d76afc941..4a7158d21 100644 --- a/src/site/apt/building/cmake.apt +++ b/src/site/apt/building/cmake.apt @@ -42,6 +42,8 @@ $ sudo make install | -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). | +*------------------------+---------------------------------------------------------------------------------------------+ +| -DBUILD_TESTING=off | Disable tests. Tests are enabled by default | *------------------------+---------------------------------------------------------------------------------------------+ Building and testing log4cxx on a Microsoft Windows with APR, Expat and APR-Util built from source