Last Meeting ("Programming Red Flags") Summary + What's Next forTelFOSS?
Dov Grobgeld
dov.grobgeld at gmail.com
Mon Jul 6 20:33:33 IDT 2009
I just reread the article Why the KDE project switched from scons to
CMake<http://lwn.net/Articles/188693/>and compared it to my needs:
- Support compilation over a fixed number of platforms: Linux, Linux
cross compilation for Windows, Windows mingw, Windows MS compiler, Solaris.
- Complete control over compiler flags for different platforms for
release and debug mode.
- No need to run "configure" since the code either relies on the cross
platform glib infrastructure or ifdef's.
- A number of autogenerated h- and c-files through either perl or python
scripts.
The last of these options is probably the reason I dropped CMake from my
consideration list. E.g. the following code that I have in my scons files is
difficult to translate:
def file2c(env, target, source):
out = open(str(target[0]), "wb")
inp = open(str(source[0]), "rb")
for line in inp.readlines():
line = line.rstrip()
line = re.sub("\\\\", "\\\\", line)
line = re.sub("\\\"", "\\\"", line)
line = '"'+line+'\\n"\n'
out.write(line)
out.close()
inp.close()
env.Command("menu-top-xml.i",
"menu-top.xml",
file2c)
I.e. the dependency is resolved through a python function that is defined
within the "makefile". I think that scons is the only system that kind of
code. Whether it is sane is a different question...
Regards,
Dov
2009/7/6 Offer Kaye <offer.kaye at gmail.com>
> 2009/7/6 Dov Grobgeld :
> > I have switched to scons a couple of years back and couldn't be happier.
>
> I read some of the threads of the KDE developers detailing how/why the
> moved from Autotools to CMake. It seems at first that actually SCons
> was the preferred contender, but when they looked into it more deeply
> they ran into trouble - apparently it was not mature enough and lacked
> all the features required for a project of the size and complexity of
> KDE4.
>
> Still it's probably good enough for less complex projects :)
>
> --
> Offer Kaye
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20090706/ce924962/attachment.html>
More information about the Linux-il
mailing list