Author

Topic: Build system (Read 8390 times)

hero member
Activity: 770
Merit: 566
fractally
July 28, 2010, 04:02:06 PM
#9
I have used cmake as well as auto tools.  cmake is great for cross platform support and I develop cross platform code full time (Mac, Linux, MinGW, VC++).
member
Activity: 84
Merit: 10
July 28, 2010, 03:40:31 PM
#8
interesting. I'd like to try. When I'll have the results I'll post here.
A small problem I had is the absence of Berkley DB search function in standard cmake distro. Does anybody have a good one? I found some for Berkley DB only, but db_cxx is needed for bitcoin.
newbie
Activity: 53
Merit: 0
July 25, 2010, 04:09:35 PM
#7
Does CMake enable, as easily, cross-compilation using mingw?

Yes, see here: http://www.cmake.org/Wiki/CmakeMingw

Other than that, CMake can generate the following (taken from documentation):
Borland Makefiles
MSYS Makefiles
MinGW Makefiles
NMake Makefiles
Unix Makefiles
Visual Studio 10
Visual Studio 10 Win64
Visual Studio 6
Visual Studio 7
Visual Studio 7 .NET 2003
Visual Studio 8 2005
Visual Studio 8 2005 Win64
Visual Studio 9 2008
Visual Studio 9 2008 Win64
Watcom WMake
CodeBlocks - MinGW Makefiles
CodeBlocks - NMake Makefiles
CodeBlocks - Unix Makefiles
Eclipse CDT4 - MinGW Makefiles
Eclipse CDT4 - NMake Makefiles
Eclipse CDT4 - Unix Makefiles
sr. member
Activity: 520
Merit: 253
555
July 25, 2010, 12:28:59 PM
#6
Is there something simpler than CMake that would work?

cmake-2.8.2.tar.gz - 5.1MB
cmake-2.8.2-Darwin-universal.dmg - 27.2 MB

Adding Yet Another Multi-Megabyte Dependency to build bitcoind seems like a backwards step to me.

I don't think that is a huge problem for _build_ dependencies. Most users will not need this to run bitcoin, any more than they need gcc.

I cannot comment on the differences between these tools, but some kind of automated makefile generator is seriously needed. I only have experience in writing makefiles by hand, and for my own builds I used the output of wx-config and similar utilities. Of couse, any sensible configure script uses these, and anything automated seems better than writing makefiles by hand for each different library version.
legendary
Activity: 1596
Merit: 1100
July 25, 2010, 12:25:37 PM
#5
Does CMake enable, as easily, cross-compilation using mingw?
legendary
Activity: 1652
Merit: 2301
Chief Scientist
July 25, 2010, 09:39:04 AM
#4
Answering my own questions:  Project using CMake

I looked at 'weechat'; they're migrating from gnu autotools to cmake (still support both, but recommend cmake).

So another +1 for cmake.
legendary
Activity: 1652
Merit: 2301
Chief Scientist
July 25, 2010, 09:20:07 AM
#3
Is there something simpler than CMake that would work?

cmake-2.8.2.tar.gz - 5.1MB
cmake-2.8.2-Darwin-universal.dmg - 27.2 MB

Adding Yet Another Multi-Megabyte Dependency to build bitcoind seems like a backwards step to me.

What's the most popular build solution for other small-ish, successful open source projects?
newbie
Activity: 17
Merit: 0
July 25, 2010, 09:02:26 AM
#2
+1 vote for CMake.  The syntax is easy to understand and it can create makefiles for a multitude of compilers.
newbie
Activity: 53
Merit: 0
July 25, 2010, 04:41:03 AM
#1
Having being tinkering with the bundled makefiles for some time now, I'd suggest we convert the build system to CMake (http://www.cmake.org/).

It's a cross-platform build system that generates build files for the platform's native tools (makefiles, MSVC project files, etc.).
The benefits:

- no need to maintain makefiles for all platforms, just one set of CMake files that will support any platform that CMake is available on.

- simplified build procedure - instead of tinkering with the bundled makefiles, run CMake to generate makefiles ready to build on your platform. Additionally, CMake can automatically detect installations of required libraries with specially written modules. For popular libraries, such modules are available with CMake installation and others can be written.

I've already used CMake for a bunch of projects and it does deliver. I can make the conversion. Any interest?
Jump to: