ww-tedit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ww-tedit-dev] Moving to cmake


From: petar marinov
Subject: Re: [ww-tedit-dev] Moving to cmake
Date: Mon, 25 Sep 2006 10:25:40 -0700
User-agent: Thunderbird 1.5.0.4 (X11/20060619)

Tzvetan Mikov wrote:
On 9/25/06, petar marinov wrote:
1) cmake is not as flexible as your own make files.

Perhaps not, but it is very flexible and even though I have used make
files for perhaps 10 years, cmake is immediately more obvious. I think
that wiill be sufficient for almost anything.

On the other hand one problem with cmake is that compiling languages
which it doesn't support directly is very verbose. Take this
expression to compile a Bison file:

ADD_CUSTOM_COMMAND(
 SOURCE p1-parse.y DEPENDS p1-parse.y OUTPUT p1-parse.tab.c p1-parse.tab.h
 COMMAND bison ARGS -v -d p1-parse.y
 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

and compare it to the make equivalent:

p1-parse.tab.c p1-parse.tab.h: p1-parse.y
     bison -v -d $<

I am still a cmake newbie; perhaps there is a better way. In any case,
cmake feels a little like Ant - it is very convenient for C, but is
clumsy for other things.

I couldn't figure some stuff about cmake myself and that's why I bought the book about cmake.


2) I think that one gnu make file can work even with visualC. Nothing
prohibits make from calling cl and link! Here where I work we use gnu
make for our windows builds.

While that is acceptable within a company, I think it is out of the
question for projects like ww. If you are going to use gmake for
Windows, you are much better off compiling with mingw.

I forgot to mention another option. There is a standalone gnu make for windows that is outside cygwin. It packages _make_ along with a few unix tools. That will be sufficient for a functional build based on gnu make with visualC on windows.

Also, I think that compiling with mingw doesn't rule out compiling with visualC. I prefer to have both.

One attractive aspect of cmake is that it generates visualC project. I'm still using visualC 6. visualC 7 is available for a free download and I would wish to compile ww with it, but it is a headache to port the project file to the new environment (more so than plainly fixing a make or cmake file).


3) Is it a good idea to ask people to have cygwin installed in order to
compile the windows version?

Definitely not.

What do you think about these options:
1) ask people to download free visualC7
2) ask people to install the standalone gnu _make_ for windows
3) ask people to install mingw which will optionally be able to compile with visualC (I don't know what is inside mingw, I believe it includes make which we can use both for mingw and _cl_)

Standalone make has one advantage. I can be make part of visialC project as external build. Probably if we go with cygwin it will be just a shade harder to achieve the same.


4) We already have a makefile for gnu make that works, going with cmake
meant that we abandone it, in this regard this is one factor to stay
with make and not move to cmake

I don't see this is a problem. For a trivial project like ww, it will
take less than half an hour to convert. Emotial attachment shouldn't
govern technical decisions.

I'm willing to sacrifice the work that went in the current makefile for unix based on the factors I mentioned in this and my previous e-mail.

--pe



-tz

PS. Should we move this to Zepp to increase the audience ?

I don't think that presently there are enough people there that would find this interesting.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]