Re: Last Meeting ("Programming Red Flags") Summary + What's Next forTelFOSS?
- On Monday 06 July 2009 20:33:33 Dov Grobgeld wrote:
> I just reread the article Why the KDE project switched from scons toWell, Offer was also referring to some threads on the KDE mailing lists (which
> CMake<http://lwn.net/Articles/188693/>and compared it to my needs:
I haven't read either).
> - Support compilation over a fixed number of platforms: Linux, LinuxCMake supports all of those except perhaps Linux-cross-compile-for-Windows
> cross compilation for Windows, Windows mingw, Windows MS compiler,
which I'm not sure about. It may exist or may not, but I'm not sure. CMake can
also generate proper Microsoft Developer Studio projects.
> Solaris. - Complete control over compiler flags for different platforms forCMake gives you that. I was able to override the C_FLAGS variable, etc.
> release and debug mode.
> - No need to run "configure" since the code either relies on the crossI don't understand that point.
> platform glib infrastructure or ifdef's.
> - A number of autogenerated h- and c-files through either perl or pythonYou can easily use custom commands or invoke external executables or scripts
with CMake. Naturally, this would mean the people building your program will
need to have perl, python or whatever installed, but it's probably not a deal
> The last of these options is probably the reason I dropped CMake from myYou can put this in a script and call it from CMake or create a custom target
> 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), "wb")
> inp = open(str(source), "rb")
> for line in inp.readlines():
> line = line.rstrip()
> line = re.sub("\\\\", "\\\\", line)
> line = re.sub("\\\"", "\\\"", line)
> line = '"'+line+'\\n"\n'
for it. You may also opt to write it in pure-CMake, but it's not absolutely
> 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...
> 2009/7/6 Offer Kaye <offer.kaye@...>
> > 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
Shlomi Fish http://www.shlomifish.org/
"Humanity" - Parody of Modern Life - http://xrl.us/bkeut
God gave us two eyes and ten fingers so we will type five times as much as we