CMake KDE release
Simon Hausmann
hausmann at kde.org
Mon Jan 30 14:15:44 GMT 2006
On Monday 30 January 2006 14:54, Dirk Mueller wrote:
> On Monday 30 January 2006 08:26, Simon Hausmann wrote:
> > correctly, then cmake doesn't even warn about the typo in the above
> > construct because the condition in ELSE is actually evaluated! That's a
> > recipe for bugs.
>
> I guess that can be fixed though..
>
> > 3) It makes the rules harder to read. Clearly
> >
> > IF (NOT APPLE AND WIN32)
> > foo()
> > ELSE IF (UNIX)
> > bar()
> > ENDIF
> >
> > is more readable than
>
> Depends on foo(). if its just one line, then yes, but if foo() is a 100
> lines chunk of stuff, then the 2nd construct is indeed easier to read.
But even with 100 lines in between
...
ELSE (UNIX)
...<another 50 lines>
you might read on first sight that the else part is under the UNIX condition,
because it looks very similar to an ELSE IF (UNIX), even though it's exactly
the opposite. You can't rely on your intuition, on your experience with other
programming languages, because cmake is different here, for no good reason as
far as I can see.
> > For someone trying to learn the KDE platform it does not matter whether
> > the build system uses a full fledged programming language or just some
> > descriptive configuration file syntax. What matters is that the syntax is
> > intuitive and consistent.
>
> Oh, then we should stick with the old Makefile.am. style descriptions ;)
Syntax wise I think they were not that bad :)
I'm not trying to argue against cmake, I'm just trying to point out issues
that I find problematic. Syntax is certainly fixable.
Simon
More information about the kde-core-devel
mailing list