<p>i'm wondering if there is any nice and neat tool to replace the GNU Autotools or Make to build a very large C++ project, which are such a complicated thing to use. </p>

<p>It is simple to generate all the files that de Autotools require if the project is small, but if the source code is divided in many directories, with multiple third party libraries and many dependencies, you fall into the "Autotools Hell"..</p>

<p>thanks for any recommendations</p>

[{'answer_id': 54697, 'author': 'Nick', 'author_id': 4949, 'author_profile': 'https://Stackoverflow.com/users/4949', 'pm_score': 4, 'selected': False, 'text': '<p><a href="http://www.cmake.org/" rel="noreferrer">CMake</a>? (generates makefiles, so technically not a replacement as such).</p>\n\n<p>I\'ve also seen "<a href="http://www.scons.org/" rel="noreferrer">SCons</a>" pop up in a few places recently. Haven\'t created anything with it myself though.</p>\n'}, {'answer_id': 54705, 'author': 'hoyhoy', 'author_id': 3499, 'author_profile': 'https://Stackoverflow.com/users/3499', 'pm_score': 2, 'selected': False, 'text': '<p>Cook is another tool that can be used to replace make.  I\'ve seen several large companies using it.  So, it is enterprise ready even though the website looks rather dated.</p>\n\n<p><a href="http://miller.emu.id.au/pmiller/software/cook/" rel="nofollow noreferrer">http://miller.emu.id.au/pmiller/software/cook/</a></p>\n'}, {'answer_id': 54742, 'author': 'amrox', 'author_id': 4468, 'author_profile': 'https://Stackoverflow.com/users/4468', 'pm_score': 5, 'selected': True, 'text': '<p>The <a href="http://code.google.com/p/v8/" rel="noreferrer">Google V8 JavaScript Engine</a> is written in C++ and uses <a href="http://www.scons.org/" rel="noreferrer">SCons</a>, so I guess that\'s one vote for it.</p>\n'}, {'answer_id': 54761, 'author': 'Greg Whitfield', 'author_id': 2102, 'author_profile': 'https://Stackoverflow.com/users/2102', 'pm_score': 3, 'selected': False, 'text': '<p>We use Jam for a complex C++ project - one benefit is that it is nicely cross platform. Rather than me spout off the benefits, just have a quick look at this link:\n<a href="http://www.perforce.com/jam/jam.html" rel="noreferrer">http://www.perforce.com/jam/jam.html</a></p>\n'}, {'answer_id': 55525, 'author': 'wilhelmtell', 'author_id': 456, 'author_profile': 'https://Stackoverflow.com/users/456', 'pm_score': 4, 'selected': False, 'text': '<p>Take a look at <a href="http://code.google.com/p/waf/" rel="noreferrer">waf</a>.</p>\n\n<p>I think you can consider it as a complete replacement for make and autotools.  It is based on python.  One thing I like about waf is that the waf script itself is ~100kb standalone that you place in your project root directory.  This is in contrast to make or rake and friends, where the build system must be installed first.  You do have to have python >=2.3 installed though.</p>\n\n<pre><code>~$ ./waf configure &amp;&amp; ./waf &amp;&amp; ./waf install\n</code></pre>\n\n<p>Waf\'s equivalent to Makefiles is the wscript file.  It is a python script waf reads, and it defines at least 3 functions:  <code>set_options()</code>, <code>configure(conf)</code> and <code>build(bld)</code>.  You can guess what each of them does.</p>\n\n<p>To jumpstart, I recommend looking in the demos/cpp/* files in the source distribution.  Also take a look at the doc/<a href="http://code.google.com/p/waf/source/browse/trunk/doc/old/waf.pdf" rel="noreferrer">waf.pdf</a> file;  it\'s a 12-page document that will quickly get you up and running.</p>\n'}, {'answer_id': 180622, 'author': 'Anthony Cramp', 'author_id': 488, 'author_profile': 'https://Stackoverflow.com/users/488', 'pm_score': 3, 'selected': False, 'text': '<p>Noel Llopis has written a few articles comparing build systems. Part 1 of "The Quest for the Perfect Build System" is at <a href="http://gamesfromwithin.com/the-quest-for-the-perfect-build-system" rel="nofollow noreferrer">http://gamesfromwithin.com/the-quest-for-the-perfect-build-system</a>. Part 2 follows on the same site. A retry of Scons is reported at <a href="http://gamesfromwithin.com/?p=104" rel="nofollow noreferrer">http://gamesfromwithin.com/?p=104</a>.</p>\n\n<p>Conclusions: SCons is too slow ... Jam is the winner.</p>\n'}, {'answer_id': 434081, 'author': 'Johan Boulé', 'author_id': 54013, 'author_profile': 'https://Stackoverflow.com/users/54013', 'pm_score': 4, 'selected': False, 'text': '<p>For a comparison of the speed of various C++ build tools, you can have a look at this benchmark:\n<a href="https://psycledelics.github.io/wonderbuild/benchmarks/time.xml" rel="nofollow noreferrer">https://psycledelics.github.io/wonderbuild/benchmarks/time.xml</a></p>\n'}, {'answer_id': 529562, 'author': 'Kristian', 'author_id': 3608, 'author_profile': 'https://Stackoverflow.com/users/3608', 'pm_score': 2, 'selected': False, 'text': '<p>I have using SCons on a big c++ project (on both Linux and Windows), and it works really well. </p>\n\n<p><code>scons all -j8</code>  (which compiles object files in parallel) is very cool!</p>\n'}, {'answer_id': 530960, 'author': 'Frank', 'author_id': 60628, 'author_profile': 'https://Stackoverflow.com/users/60628', 'pm_score': 1, 'selected': False, 'text': '<p>I use <a href="http://www.bakefile.org/index.html" rel="nofollow noreferrer">bakefile</a> for my build process and I became a big fan!</p>\n\n<p>I never have to write a Makefile myself anymore, let alone horrible GNU autotools scripts. All I have to do is provide an <code>XML</code> file that describes the build targets. Bakefile can convert this into a Makefile that gets all the (header file) dependencies right etc, where different Makefile formats may be chosen (pasting the list from the documentation):</p>\n\n<pre><code>available formats are:\n    autoconf      GNU autoconf Makefile.in files\n    borland       Borland C/C++ makefiles\n    dmars         Digital Mars makefiles\n    dmars_smake   Digital Mars makefiles for SMAKE\n    gnu           GNU toolchain makefiles (Unix)\n    mingw         MinGW makefiles (mingw32-make)\n    msevc4prj     MS eMbedded Visual C++ 4 project files\n    msvc          MS Visual C++ nmake makefiles\n    msvc6prj      MS Visual C++ 6.0 project files\n    msvs2003prj   MS Visual Studio 2003 project files\n    msvs2005prj   MS Visual Studio 2005 project files\n    symbian       Symbian development files\n    watcom        OpenWatcom makefiles\n    xcode2        Xcode 2.4 project files\n</code></pre>\n\n<p>I usually use the <em>autoconf</em> option, and it writes the annoying GNU autotools scripts for me. I did have to adapt the <code>configure.ac</code> script, so that configure finds a certain library on any system. But it wasn\'t too bad. Getting the autoconf scripts in this way is nice, because I don\'t have to write them all by myself, and when I distribute my project it will look as if I had written them, and users can still build my project in the god-given way, with </p>\n\n<pre><code>./configure &amp;&amp; make &amp;&amp; make install\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/54674', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1876/']