Build log4cpp with CMake

I've just created a "next" branch in the gitorious orocos-toolchain/log4cpp project (not sure if doing this emails everyone, hence this email). This branch supports building log4cpp via CMake. It uses a hard-coded configuration file that works for Ubuntu 10.04 and Mac OS X Snow Leopard. Ideally this config file should be generated based on the results of tests run by CMake, but this worked for our purposes.

Please try and let me know if it works for you. Based on feedback, we can choose whether to merge to master.
S

Build log4cpp with CMake

2011/1/10 S Roderick <kiwi [dot] net [..] ...>

> I've just created a "next" branch in the gitorious orocos-toolchain/log4cpp
> project (not sure if doing this emails everyone, hence this email). This
> branch supports building log4cpp via CMake. It uses a hard-coded
> configuration file that works for Ubuntu 10.04 and Mac OS X Snow Leopard.
> Ideally this config file should be generated based on the results of tests
> run by CMake, but this worked for our purposes.
>
>
I fixed the CMake file to work correctly on win32. Could you please apply
this patch to your "next" branch? Altough the LoggingService may never work
(no rt-alloc on win32) on this platform, we are going to use it in our
windows GUI to harmonize the logging statements for non-realtime targets.

Thank you,

Philippe Hamelin

Build log4cpp with CMake

On Feb 3, 2011, at 13:08 , Philippe Hamelin wrote:

> 2011/1/10 S Roderick <kiwi [dot] net [..] ...>
> I've just created a "next" branch in the gitorious orocos-toolchain/log4cpp project (not sure if doing this emails everyone, hence this email). This branch supports building log4cpp via CMake. It uses a hard-coded configuration file that works for Ubuntu 10.04 and Mac OS X Snow Leopard. Ideally this config file should be generated based on the results of tests run by CMake, but this worked for our purposes.
>
>
> I fixed the CMake file to work correctly on win32. Could you please apply this patch to your "next" branch? Altough the LoggingService may never work (no rt-alloc on win32) on this platform, we are going to use it in our windows GUI to harmonize the logging statements for non-realtime targets.
>
> Thank you,
>
> Philippe Hamelin
> <0001-Fix-CMake-file-for-win32.patch>

Done. I moved the changes around just a little.
S

Build log4cpp with CMake

On Feb 3, 2011, at 13:08 , Philippe Hamelin wrote:

> 2011/1/10 S Roderick <kiwi [dot] net [..] ...>
> I've just created a "next" branch in the gitorious orocos-toolchain/log4cpp project (not sure if doing this emails everyone, hence this email). This branch supports building log4cpp via CMake. It uses a hard-coded configuration file that works for Ubuntu 10.04 and Mac OS X Snow Leopard. Ideally this config file should be generated based on the results of tests run by CMake, but this worked for our purposes.
>
>
> I fixed the CMake file to work correctly on win32. Could you please apply this patch to your "next" branch? Altough the LoggingService may never work (no rt-alloc on win32) on this platform, we are going to use it in our windows GUI to harmonize the logging statements for non-realtime targets.

Will do.

NB we use TLSF on Mac OS X. Definitely not real-time, but the actual TLSF implemention is pretty portable. Probably can be made to work on Windows?
S

Build log4cpp with CMake

2011/1/11 S Roderick <kiwi [dot] net [..] ...>:
> I've just created a "next" branch in the gitorious orocos-toolchain/log4cpp project (not sure if doing this emails everyone, hence this email). This branch supports building log4cpp via CMake. It uses a hard-coded configuration file that works for Ubuntu 10.04 and Mac OS X Snow Leopard. Ideally this config file should be generated based on the results of tests run by CMake, but this worked for our purposes.
>
> Please try and let me know if it works for you. Based on feedback, we can choose whether to merge to master.

Working on Fedora 14 x86_64. Trying to install in e.g. ./install ,
files actually got installed in ./install/usr/local/ ...
Is there a way to build all source files in a given directory instead
of listing them all?
Patch in appendix for ROS build systems - without 'make install' step,
as all header files are already in ./include

Steven

> S
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>

Build log4cpp with CMake

On Tuesday 11 January 2011 08:09:57 Steven Bellens wrote:
> 2011/1/11 S Roderick <kiwi [dot] net [..] ...>:
> > I've just created a "next" branch in the gitorious
> > orocos-toolchain/log4cpp project (not sure if doing this emails
> > everyone, hence this email). This branch supports building log4cpp via
> > CMake. It uses a hard-coded configuration file that works for Ubuntu
> > 10.04 and Mac OS X Snow Leopard. Ideally this config file should be
> > generated based on the results of tests run by CMake, but this worked
> > for our purposes.
> >
> > Please try and let me know if it works for you. Based on feedback, we can
> > choose whether to merge to master.
>
> Working on Fedora 14 x86_64. Trying to install in e.g. ./install ,
> files actually got installed in ./install/usr/local/ ...

This must be fixed.

> Is there a way to build all source files in a given directory instead
> of listing them all?
> Patch in appendix for ROS build systems - without 'make install' step,
> as all header files are already in ./include
>

When using ROS, we must install in the ./install directory, since the .pc files
will be searched for as well in the next version of the toolchain's cmake
magic.

Peter

Build log4cpp with CMake

On Jan 11, 2011, at 07:44 , Peter Soetens wrote:

> On Tuesday 11 January 2011 08:09:57 Steven Bellens wrote:
>> 2011/1/11 S Roderick <kiwi [dot] net [..] ...>:
>>> I've just created a "next" branch in the gitorious
>>> orocos-toolchain/log4cpp project (not sure if doing this emails
>>> everyone, hence this email). This branch supports building log4cpp via
>>> CMake. It uses a hard-coded configuration file that works for Ubuntu
>>> 10.04 and Mac OS X Snow Leopard. Ideally this config file should be
>>> generated based on the results of tests run by CMake, but this worked
>>> for our purposes.
>>>
>>> Please try and let me know if it works for you. Based on feedback, we can
>>> choose whether to merge to master.
>>
>> Working on Fedora 14 x86_64. Trying to install in e.g. ./install ,
>> files actually got installed in ./install/usr/local/ ...
>
> This must be fixed.

How did you call cmake? Did you add "-DCMAKE_INSTALL_PREFIX=./install"?

>> Is there a way to build all source files in a given directory instead
>> of listing them all?
>> Patch in appendix for ROS build systems - without 'make install' step,
>> as all header files are already in ./include
>>
>
> When using ROS, we must install in the ./install directory, since the .pc files
> will be searched for as well in the next version of the toolchain's cmake
> magic.

I don't override the default CMake install logic, though I believe the log4cpp crowd had originally. I can definitely install in something like ../../install (which is our setup).

I just tried

cmake /g/o/log4cpp -DCMAKE_INSTALL_PREFIX=../install

and it works as expected. What is the result of

grep INSTALL CMakeCache.txt

in your build dir?
S

Build log4cpp with CMake

2011/1/11 S Roderick <kiwi [dot] net [..] ...>:
> On Jan 11, 2011, at 07:44 , Peter Soetens wrote:
>
>> On Tuesday 11 January 2011 08:09:57 Steven Bellens wrote:
>>> 2011/1/11 S Roderick <kiwi [dot] net [..] ...>:
>>>> I've just created a "next" branch in the gitorious
>>>> orocos-toolchain/log4cpp project (not sure if doing this emails
>>>> everyone, hence this email). This branch supports building log4cpp via
>>>> CMake. It uses a hard-coded configuration file that works for Ubuntu
>>>> 10.04 and Mac OS X Snow Leopard. Ideally this config file should be
>>>> generated based on the results of tests run by CMake, but this worked
>>>> for our purposes.
>>>>
>>>> Please try and let me know if it works for you. Based on feedback, we can
>>>> choose whether to merge to master.
>>>
>>> Working on Fedora 14 x86_64. Trying to install in e.g. ./install ,
>>> files actually got installed in ./install/usr/local/ ...
>>
>> This must be fixed.
>
> How did you call cmake? Did you add "-DCMAKE_INSTALL_PREFIX=./install"?

No. This method works fine! Instead, I used the approach as mentioned
in the CMakeLists.txt:

"(4) To install either "make install" or "make install DESTDIR=<your
directory>"" - which actually installs in DESTDIR / usr / local /

>
>>> Is there a way to build all source files in a given directory instead
>>> of listing them all?
>>> Patch in appendix for ROS build systems - without 'make install' step,
>>> as all header files are already in ./include
>>>
>>
>> When using ROS, we must install in the ./install directory, since the .pc files
>> will be searched for as well in the next version of the toolchain's cmake
>> magic.

Second attempt to patch. Now installation step installs in ./install
for ROS build systems.
Can you cherry-pick my commit which adds export flags in the manifest as well?

Author: Steven Bellens <steven [dot] bellens [..] ...>
AuthorDate: Mon Dec 20 10:06:08 2010 +0100
Commit: Steven Bellens <steven [dot] bellens [..] ...>
CommitDate: Tue Jan 11 15:45:36 2011 +0100

manifest: provide export flags for log4cpp.

Signed-off-by: Peter Soetens <peter [..] ...>

Steven

>
> I don't override the default CMake install logic, though I believe the log4cpp crowd had originally. I can definitely install in something like ../../install (which is our setup).
>
> I just tried
>
> cmake /g/o/log4cpp -DCMAKE_INSTALL_PREFIX=../install
>
> and it works as expected. What is the result of
>
> grep INSTALL CMakeCache.txt
>
> in your build dir?
> S
>
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>

Build log4cpp with CMake

On Jan 11, 2011, at 09:55 , Steven Bellens wrote:

> 2011/1/11 S Roderick <kiwi [dot] net [..] ...>:
>> On Jan 11, 2011, at 07:44 , Peter Soetens wrote:
>>
>>> On Tuesday 11 January 2011 08:09:57 Steven Bellens wrote:
>>>> 2011/1/11 S Roderick <kiwi [dot] net [..] ...>:
>>>>> I've just created a "next" branch in the gitorious
>>>>> orocos-toolchain/log4cpp project (not sure if doing this emails
>>>>> everyone, hence this email). This branch supports building log4cpp via
>>>>> CMake. It uses a hard-coded configuration file that works for Ubuntu
>>>>> 10.04 and Mac OS X Snow Leopard. Ideally this config file should be
>>>>> generated based on the results of tests run by CMake, but this worked
>>>>> for our purposes.
>>>>>
>>>>> Please try and let me know if it works for you. Based on feedback, we can
>>>>> choose whether to merge to master.
>>>>
>>>> Working on Fedora 14 x86_64. Trying to install in e.g. ./install ,
>>>> files actually got installed in ./install/usr/local/ ...
>>>
>>> This must be fixed.
>>
>> How did you call cmake? Did you add "-DCMAKE_INSTALL_PREFIX=./install"?
>
> No. This method works fine! Instead, I used the approach as mentioned
> in the CMakeLists.txt:
>
> "(4) To install either "make install" or "make install DESTDIR=<your
> directory>"" - which actually installs in DESTDIR / usr / local /

Oh yeah. I've revised these instructions ... the first version of this CMake file left a lot to be desired ...

>>>>
>>>> Is there a way to build all source files in a given directory instead
>>>> of listing them all?
>>>> Patch in appendix for ROS build systems - without 'make install' step,
>>>> as all header files are already in ./include
>>>>
>>>
>>> When using ROS, we must install in the ./install directory, since the .pc files
>>> will be searched for as well in the next version of the toolchain's cmake
>>> magic.
>
> Second attempt to patch. Now installation step installs in ./install
> for ROS build systems.
> Can you cherry-pick my commit which adds export flags in the manifest as well?
>
> Author: Steven Bellens <steven [dot] bellens [..] ...>
> AuthorDate: Mon Dec 20 10:06:08 2010 +0100
> Commit: Steven Bellens <steven [dot] bellens [..] ...>
> CommitDate: Tue Jan 11 15:45:36 2011 +0100
>
> manifest: provide export flags for log4cpp.
>
> Signed-off-by: Peter Soetens <peter [..] ...>

Done
S