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

Dmytro Lytovchenko dmytro.lytovchenko@REDACTED
Tue Aug 16 11:54:51 CEST 2016


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160816/7abb5809/attachment.htm>


More information about the erlang-questions mailing list