On Wed, Sep 02, 2009 at 12:51:12PM -0500, Bob Tanner wrote:
> On 2009-08-31 12:12:48 -0500, Bob Tanner 
> <basic at us.netrek.org> said:
> 
> >> Is there some file that describes how to use
> >> cmake within the source?
> > 
> > The code is the documentation? ;-)
> > 
> > I'll write something up.
> 
> http://wiki.netrek.org/index.php/Building#CMake_Building
> 
> and
> 
> https://answers.launchpad.net/netrek-server/+question/81716

I've moved this into the source repository because I think it is
critical that the source be self documented when distributed in .tar.gz
form.  I don't think source documentation should be stored outside the
source.

I've created two files;

1.  INSTALL.cmake which is a narrative of the process, although it is
incomplete, and

2.  tests/build-cmake which does what tests/build does except it uses
cmake.

These are both pushed to my public repository.

Now, there are several problems that I need assistance with ...

a.  there is no "make install" target, so one can't complete the task of
getting a server built and operational, ... this is critical,

b.  there is no obvious way to provide a --prefix argument as with the
autoconf method, ... this is critical,

c.  the tests/build-cmake stored in darcs without execute bit needs to
be fixed between the time the darcs repository is fetched and the first
use is made ... this used to be done by autogen.sh, but if we're
deprecating autogen.sh we have to find some other way of restoring
execute bits, ... this is trivial and manageable,

d.  changing one source file and rerunning cmake seems to recompile more
than expected, or it is too verbose ... see below for test results ...
this is a hindrance but not critical ... it would be less useful in the
situation that most server operators use ... which is maintaining a
server from a source directory that is a darcs repository or unpacked
tarball.

On the other hand, there does seem to be a time advantage to cmake.

--

Test results, output line count based on normal maintenance tasks.

1.  autotools, existing, full build 253 lines, one file changed 67
lines, no files changed 32 lines,

2.  CMake, proposed, full build 1234 lines, one file changed 600 lines,
no files changed 496 lines.

--

Test results, wall clock duration of various build methods.

1.  autotools, full build, 55 seconds,

2.  CMake, full build, 34 seconds,

3.  autotools, rebuild of one file, 2.5 seconds,

4.  CMake, rebuild of one file, 4 seconds.

-- 
James Cameron
http://quozl.linux.org.au/