[Log4cplus-devel] [log4cplus:bugs] #317 Cannot compile a Single Threaded version and the Simple Ser
Logging Framework for C++
Brought to you by:
wilx
From: Václav H. <wi...@us...> - 2017-07-11 14:33:02
|
- **labels**: cmake, thread, simpleserver --> cmake, simpleserver, threads --- ** [bugs:#317] Cannot compile a Single Threaded version and the Simple Server simultaneously.** **Status:** closed **Group:** v1.2.x **Labels:** cmake simpleserver threads **Created:** Thu May 28, 2015 06:09 AM UTC by Alexis Wilke **Last Updated:** Thu May 28, 2015 09:54 AM UTC **Owner:** Václav Haisman **Attachments:** - [0001-log4cplus-1.2.0-rc3.patch](https://sourceforge.net/p/log4cplus/bugs/317/attachment/0001-log4cplus-1.2.0-rc3.patch) (624 Bytes; text/x-patch) I initialized the compilation environment using both: the simple server and the single threaded flags on. mkdir BUILD cd BUILD cmake -DLOG4CPLUS_SINGLE_THREADED=OFF ../log4cplus Unfortunately, the simple server makes use of threads: class ClientThread : public log4cplus::thread::AbstractThread ... It seems to me that you could test and err in the main cmake so we don't get a surprise at the end. There is what I propose: --- a/log4cplus-1.2.0-rc3/CMakeLists.txt 2015-01-04 06:42:13.904962796 -0800 +++ b/log4cplus/CMakeLists.txt 2015-05-27 22:48:13.802072656 -0700 @@ -33,6 +33,10 @@ message (STATUS "Threads: ${CMAKE_THREAD_LIBS_INIT}") endif(NOT LOG4CPLUS_SINGLE_THREADED) +if(LOG4CPLUS_SINGLE_THREADED AND LOG4CPLUS_BUILD_LOGGINGSERVER) + message (FATAL_ERROR "The logging server requires the multi-thread capability.") +endif(LOG4CPLUS_SINGLE_THREADED AND LOG4CPLUS_BUILD_LOGGINGSERVER) + set(BUILD_SHARED_LIBS TRUE CACHE BOOL "If TRUE, log4cplus is built as a shared library, otherwise as a static library") if (WIN32) --- Sent from sourceforge.net because log...@li... is subscribed to https://sourceforge.net/p/log4cplus/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/log4cplus/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |