[zeromq-dev] zmq cmake patch

George Neill georgen at neillnet.com
Fri Nov 21 11:01:07 CET 2008


Malo,

On Fri, Nov 21, 2008 at 3:40 AM, Pavol Malosek <malosek at fastmq.com> wrote:
> 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.

Right you don't need the socket libs on linux, but you will on solaris.

>> # 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.


I am okay with that.   My recommendation would be to place a

message(fatal_error "fix it and send it back to us")

in the else condition (where I define ZMQ_HAVE_UNKNOWN)  in the
zmq_have_platform.cmake script, rather than littering those same
conditionals everywhere.


Thanks,
George.



More information about the zeromq-dev mailing list