[zeromq-dev] zmq cmake patch

Pavol Malosek malosek at fastmq.com
Fri Nov 21 09:40:23 CET 2008


Hello,

>
> Regarding your attached patch, you'll probably want to remove this
> (below) from trunk/zmq_server/CMakeLists.txt, as it's already created
> by the trunk/zmq/CMakeLists.txt
>
> configure_file (
>  "${libzmq_SOURCE_DIR}/platform.hpp.cmake"
>  "${libzmq_BINARY_DIR}/platform.hpp"
> )
>
> It is not necessary to do it a second time.

Indeed!

>
> Also, when doing this (below) you'll probably want to take in to
> account libs such as socket nsl, rt, etc ..  not just compile macros.

I have wrote that is minimal cmake support patch (only zmq and zmq_server is 
build on Linux).
On Linux it perfectly works even without linking with socket libs I just did 
not delete the other elseifs.

>
> # Set compile defines according platform
> if (ZMQ_HAVE_LINUX)
>    add_definitions (-D_REENTRANT)
> elseif (ZMQ_HAVE_SOLARIS)
>    add_definitions (-D_REENTRANT -D_PTHREADS)
>>>>>>>>>  set( SOCKET_LIBS "socket;nsl")  <<<<<<<<<<<
> elseif  (ZMQ_HAVE_FREEBSD OR ZMQ_HAVE_QNXNTO)
>    add_definitions (-D_THREAD_SAFE)
> elseif (ZMQ_HAVE_UNKNOWN)
>    MESSAGE (FATAL_ERROR "Not supported OS: ${CMAKE_SYSTEM_NAME}")
> endif (ZMQ_HAVE_LINUX)
>
> I don't think it is fair to stop the build here.
>   e.g. windows, would compile fine without any additional compile macros.

This is important for us, to keep things under our control. ZMQ has to be 
tested
on each platform which we are officially supporting. We don't want people 
complaining
about unsupported platforms. If they want to run on such a platform they can 
modify
the build script, test it and contribute it back as you did with AIX & 
HP-UX.

malo 




More information about the zeromq-dev mailing list