[zeromq-dev] CMake adequacy
David Wolfe
evadeflow at gmail.com
Tue Oct 19 17:09:14 CEST 2010
> Sorry, I really do feel pretty strongly in the negative on CMake, love
> the idea, HATE the "language" with a serious passion.
Seconded. As a reluctant 'power user' of CMake, I despise the language,
but love the functionality. There have been some heated discussions on
the CMake mailing lists about this, and a few fumbling attempts to add
Lua support:
- http://www.assembla.com/wiki/show/CMakeLua
Premake looks very interesting, especially to a Lua fan like myself.
(The zeromq app I'm working on right now is using Lua as the 'protocol
language') . I didn't see Eclipse project files on the list of supported
output formats, though, and the cross-compilation support is labeled
'experimental', so... it'll be awhile before I can play around with it.
FWIW, I'm appending the CMakeLists.txt file I'm using to build zeromq
below. It's not cross-platform, since I ran ./configure to generate
platform.hpp and then just committed this file. But it's getting the job
done for now...
----------
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
set(ZMQ_SOURCES
src/app_thread.cpp src/command.cpp src/ctx.cpp src/devpoll.cpp
src/push.cpp src/epoll.cpp src/err.cpp src/forwarder.cpp
src/fq.cpp src/io_object.cpp src/io_thread.cpp src/ip.cpp
src/kqueue.cpp src/lb.cpp src/msg_store.cpp src/object.cpp
src/options.cpp src/owned.cpp src/pgm_receiver.cpp src/pgm_sender.cpp
src/pgm_socket.cpp src/pair.cpp src/prefix_tree.cpp src/pipe.cpp
src/poll.cpp src/pub.cpp src/queue.cpp src/rep.cpp
src/req.cpp src/select.cpp src/session.cpp src/signaler.cpp
src/socket_base.cpp src/streamer.cpp src/sub.cpp
src/tcp_connecter.cpp
src/tcp_listener.cpp src/tcp_socket.cpp src/thread.cpp src/pull.cpp
src/uuid.cpp src/xrep.cpp src/xreq.cpp src/zmq.cpp
src/zmq_connecter.cpp src/zmq_decoder.cpp src/zmq_encoder.cpp
src/zmq_engine.cpp src/zmq_init.cpp src/zmq_listener.cpp)
add_library(zmq SHARED ${ZMQ_SOURCES})
target_link_libraries(zmq pthread uuid)
On 10/19/2010 12:05 AM, Kelly Brock wrote:
> If you are going to use a build tool just for Window's, I'd argue in favor
> of Premake4. CMake's language is a pain in the ass, even more quirky than
> makefiles and all the autoconf-like stuff it does is basically completely
> unneeded on windows. I wrote premake4 builds for zmq first day I started
> using it, it took about 30 minutes to figure out which files I needed and
> the correct defines, since then it has just been a minor update once due to
> change from upstream/downstream to push/pull files.
>
> I feel rather strongly about CMake in the negative. I used it, liked its
> abilities but despised the language and missing cross language support. (I
> use C#/Mono for certain parts of my codebase, mostly just tools which need
> windows. CMake doesn't support that.) Premake is just a Lua extension with
> "make" abilities. Lua is a well defined, generic and simple language, CMake
> script is a mess of make/bash/perl/whatever concepts all mixed up which are
> archaic and bizarre in comparison.
>
> For a new/clean codebase, CMake is intended to replace autoconf and do a lot
> more things. Premake is basically the same but it doesn't have much of the
> autoconf code, it's still adding it. CMake uses a god awful language,
> premake is just an extension of lua. CMake does not support much more than
> any language supported by gmake, Premake supports anything you want to add
> and currently supports what CMake does plus C#/Mono, addons exist for D, Go,
> and other "new" languages.
>
> Maybe the folks you are talking about have a reason for needing a
> complicated god awful build system, zmq doesn't need such a monster. My
> initial premake scripts have worked on Windows, OsX, BSD 5 and latest Ubuntu
> without issue. And it is under 10 lines of script, subtracting the source
> file list. More importantly, anyone who can program just about any real
> language, can read the code without issue. CMake scripts are quirky
> bastards last time I tried to do anything with them beyond a simple file
> list.
>
> Sorry, I really do feel pretty strongly in the negative on CMake, love the
> idea, HATE the "language" with a serious passion.
>
> KB
>
>> -----Original Message-----
>> From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-
>> bounces at lists.zeromq.org] On Behalf Of Steven McCoy
>> Sent: Monday, October 18, 2010 9:26 PM
>> To: zeromq-dev at lists.zeromq.org
>> Subject: [zeromq-dev] CMake adequacy
>>
>> An interesting compromise out of the libjpeg-turbo team, use Autoconf on
>> Unix and CMake on Windows:
>>
>> http://sourceforge.net/mailarchive/forum.php?thread_name=20101015101132.GA
>> 6167%40traged.englab.brq.redhat.com&forum_name=tigervnc-devel
>>
>> --
>> Steve-o
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list