Re: [Log4cplus-devel] Fixes for CMake build files.
Logging Framework for C++
Brought to you by:
wilx
From: Václav Z. <vha...@gm...> - 2012-09-13 05:55:18
|
On 09/13/2012 01:23 AM, Chernyshev Vyacheslav wrote: > Hello. > > After various unsuccessful attempts to compile log4cplus on OS X from > provided autotools-generated configure file using Clang compiler I've I wonder what difficulties you have had with the Autotools build system on MacOS X. I am keen on fixing those as well. > decided to try CMake build. And it turned out that some configure > defines are simply missing. Here are the fixes that I've made. All paths > are relative to project's root directory. I have just recently added a TODO item just for that. :) > > 1. ./CMakeLists.txt https://gist.github.com/3710553 > - added WITH_ICONV option that sets LOG4CPLUS_WITH_ICONV, the same > is done when --with-iconv option is provided to configure system. > 2. ./ConfigureChecks.cmake https://gist.github.com/3710633 > - added very simple check to find system-provided iconv library, it > may be required to use iconv* functions on some systems; > - added checks for functions mbstowcs, wcstombs, nanosleep; > - added check for __func__ symbol; > - iconv* functions will now be checked only when LOG4CPLUS_WITH_ICONV > is defined, it mimics behaviour of autotools build system; > - added proper checks for DECLSPEC_EXPORT/IMPORT/PRIVATE, taken from > autotools files; > - added thread-local support detection; > - added C++11 atomics detection. > 3. ./src/CMakeLists.txt https://gist.github.com/3710658 > - link iconv library if it is required to use iconv* functions and > iconv support was requested. > 4. ./include/log4cplus/config/defines.hxx.cmake.in > https://gist.github.com/3710667 > - added missing defines to make it on par with defines.hxx.in. I have applied all of the patches to both trunk and 1.1.x branch. > > There are additional things to tweak in CMake files, but it can be > discussed later. Feel free to send more patches to improve MacOS X support. I have no way of testing log4cplus for it. -- VZ |