[erlang-questions] A project to replace build system with CMake

Marco Molteni marco.molteni@REDACTED
Wed Aug 17 09:11:49 CEST 2016

Hello Dmytro,

very good effort!

I use cmake extensively and, although not perfect, it is light-years better or less painful than autotools.

Regarding the cons, I think you meant them as temporary cons, in the sense that all 3 of them can be handled with cmake, I think you meant you are not there yet :-)

Anyway, as somebody who does huge cmake projects at work, I think this approach makes a lot of sense. Hope this will gain traction.


> On 16 Aug 2016, at 11:54, Dmytro Lytovchenko <dmytro.lytovchenko@REDACTED> wrote:
> Good day everyone
> https://github.com/kvakvs/otp/tree/cmake
> Here's one thing i've spent few weeks on (its been several attempts, this is the most recent and most successful attempt so far). It uses CMake to configure (not all but many of config.h fields), it calls generator Perl scripts, it compiles emulator, epmd and tools in erts/etc, and the result is runnable. It allows to configure some build variables like platform, HiPE, etc (see root CMakeLists.txt). It only builds on Linux now (using couple months old master).
> Pros:
> - Automake/autoconf begone.
> - Easier start (make directory, run cmake from it, run make)
> - Shorter build scripts (much shorter actually). Better control over what goes to which directory, easier to group files into static/dynamic libs or executables.
> - Better control over compiler command lines and dependencies.
> - Better control over what is written to which directory. All build results are now contained in build directory.
> - Crossplatform, also supports making projects for major IDEs.
> - It is possible to easily force C++ compiler on every C file (which after fixing few compile errors allows using Windows MSVC compiler infrastructure and step away from MinGW/Cygwin, which right now is blocking transition to C99/C11). I've investigated this way, it is not too much to fix.
> Cons:
> - Results aren't placed in such a way to form Erlang release directory structure, that can be fixed later.
> - Cross-compiling is not working. 32-bit compiling on 64-bit machine is close to be working.
> - Libs/tests/docs are not built this way. This can be added later.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list