You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rm...@apache.org on 2020/08/27 00:38:14 UTC

[logging-log4cxx] 01/01: Search for programs needed for tests

This is an automated email from the ASF dual-hosted git repository.

rmiddleton pushed a commit to branch needed-programs
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git

commit 40f70541edd57ff62d0c90256bb3aabce417dc1e
Author: Robert Middleton <ro...@rm5248.com>
AuthorDate: Wed Aug 26 20:37:54 2020 -0400

    Search for programs needed for tests
---
 CMakeLists.txt              | 7 +++++++
 src/test/cpp/CMakeLists.txt | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d30a71b..4c50a45 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -123,3 +123,10 @@ message(STATUS "  logchar type .................... : ${LOG4CXX_CHAR}")
 message(STATUS "  Using libESMTP .................. : ${HAS_LIBESMTP}")
 message(STATUS "  ODBC library .................... : ${HAS_ODBC}")
 message(STATUS "  syslog .......................... : ${HAS_SYSLOG}")
+
+if(BUILD_TESTING)
+message(STATUS "Applications required for tests:")
+message(STATUS "  zip ............................. : ${ZIP_EXE}")
+message(STATUS "  sed ............................. : ${SED_EXE}")
+message(STATUS "  gzip ............................ : ${GZIP_EXE}")
+endif(BUILD_TESTING)
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index bdb66fe..3e1ece3 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -5,6 +5,13 @@ target_include_directories(testingFramework PRIVATE ${CMAKE_CURRENT_LIST_DIR} $<
 add_subdirectory(util)
 target_sources(testingUtilities PRIVATE xml/xlevel.cpp)
 
+# sed, zip, and gzip are needed for the tests to work properly
+# Note: option 'required' not available until cmake 3.18, however adding
+# it does not cause an issue
+find_program(SED_EXE sed REQUIRED)
+find_program(ZIP_EXE zip REQUIRED)
+find_program(GZIP_EXE gzip REQUIRED)
+
 # Tests defined in this directory
 set(ALL_LOG4CXX_TESTS
     asyncappendertestcase