<div dir="ltr">I just reread the article Why the <a href="http://lwn.net/Articles/188693/">KDE project switched from scons to CMake</a> and compared it to my needs:<br><ul><li>Support compilation over a fixed number of platforms: Linux, Linux cross compilation for Windows, Windows mingw, Windows MS compiler, Solaris.</li>
<li>Complete control over compiler flags for different platforms for release and debug mode.</li><li>No need to run "configure" since the code either relies on the cross platform glib infrastructure or ifdef's.</li>
<li>A number of autogenerated h- and c-files through either perl or python scripts.</li></ul>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:<br>
<br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">def file2c(env, target, source):</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> out = open(str(target[0]), "wb")</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> inp = open(str(source[0]), "rb")</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> for line in inp.readlines():</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> line = line.rstrip()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> line = re.sub("\\\\", "\\\\", line)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> line = re.sub("\\\"", "\\\"", line)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> line = '"'+line+'\\n"\n'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> out.write(line)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> out.close()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> inp.close()</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">env.Command("menu-top-xml.i",</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> "menu-top.xml",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> file2c)<br><br style="font-family: courier new,monospace;"></span></div>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...<br>
<br>Regards,<br>Dov<br><br><div class="gmail_quote">2009/7/6 Offer Kaye <span dir="ltr"><<a href="mailto:offer.kaye@gmail.com">offer.kaye@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2009/7/6 Dov Grobgeld :<br>
<div class="im">> I have switched to scons a couple of years back and couldn't be happier.<br>
<br>
</div>I read some of the threads of the KDE developers detailing how/why the<br>
moved from Autotools to CMake. It seems at first that actually SCons<br>
was the preferred contender, but when they looked into it more deeply<br>
they ran into trouble - apparently it was not mature enough and lacked<br>
all the features required for a project of the size and complexity of<br>
KDE4.<br>
<br>
Still it's probably good enough for less complex projects :)<br>
<br>
--<br>
<font color="#888888">Offer Kaye<br>
</font></blockquote></div><br></div>