Skip to content
Karel Kubicek edited this page Mar 2, 2018 · 48 revisions

EACirc can be comfortably build using CMake (cmake.org) on Linux and Windows. The minimal supported version of CMake is 3.4.

The EACirc framework consists of core files, stream projects, and 3rd party libs.

EACirc is self-version aware: to ease experiment replication, hash of the current git commit is build in the binary. The commit information is saved in file Version.h and updated during generation of CMake files. To successfully configure, generate and build the EACirc project the git tools are required and git must be found by CMake (on Windows, this means having git in the system PATH!).

Note: version tag is not updated automatically correctly, you need to reconfigure the project to update the tag.

Note: EACirc is mixing plain C and C++ source files (C files included by typical extern "C" method). Beware if you are using some other building system, since problems in linking may occur because of this.

CMake

If you are not familiar with basic workflow and usage of CMake please read the CMake Wiki.

To set debug or release mode for build please use standard CMake macro for it, ie. in terminal use cmake -DCMAKE_BUILD_TYPE=Release <source_dir> or cmake -DCMAKE_BUILD_TYPE=Debug <source_dir>.

By default all targets builds (3rd party libs, EACirc, and all projects). If you don't want or don't need to build any project there is a CMake option for it called BUILD_<TARGET>, ie. BUILD_CAESAR, BUILD_SHA3, BUILD_ESTREAM. You can turn on/off this option in cmake-gui or ccmake during configuration.

Note: CAESAR project is not supported now.

The EACirc output files are build to the run directory along with their configuration files, ie <build_dir>/run.

There are test targets that are described at testing wiki page.

Building example

You can build EACirc on Linux using cmake with the following sequence in the root project directory:

$ mkdir build && cd build
$ ccmake ..
(configure, alter settings as desired, generate)
$ make

You can use Cmake GUI (or CLI version called ccmake) to configure the project before the build if you feel uncomfortable with the command line.

For development in some IDE (e.g. MS Visual Studio, Qt Creator, ...), use Cmake GUI to configure the project (select your IDE version). Cmake then automatically generates appropriate project files for you.

Some useful notes:

  • Qt Creator on CMake uses CodeBlocks project files (.cbp). You can generate it when loading the CMake to Qt Creator and reconfigure it by ccmake later, as desired.
  • MS Visual Studio supports multiple build types (e.g. Debug+Release), while in other IDEs (e.g. Qt Creator) you need to have a separate build folder for each type. MS VS is not supported/tested now.
  • As a back-end low-level build system, you can use ninja-build instead of GNU Make. It automatically runs in parallel and builds the project faster. Just use a different generator for cmake/ccmake (in linux, provide the arguments -G Ninja).

Supported compilers

  • gcc-5+
  • clang-3.4+
  • Apple LLVM version 7.3.0 (clang-703.0.31)
  • almost any with good c++14 support

Microsoft Visual Studio notes

We do not support build for MS VS. If you want help with MS VS build, write us or create an issue ;).

Target dependency graph

TODO

Clone this wiki locally