How to build Cheerp on Linux
Cheerp is composed of multiple components, they are somewhat interdependent and should be built together. The build instructions are provided for the stable release, Cheerp 3.0, or for the latest / development branch.
Scroll to bottom for the instruction for the latest version, or keep reading to build stable.
Prerequisites
We assume that you have git, cmake, python and a modern C++ compiler properly installed. Example, using apt-get:
Build stable version, Cheerp 3.0
Get the sources, stable version
You need to get all the sources first. Please define the CHEERP_DEST
environment variable that will be used in various commands.
Build Cheerp/1: compiler, stable version
By default Cheerp will be installed in /opt/cheerp
, with the main executable at /opt/cheerp/bin/clang++
.
If you need write privileges to /opt/cheerp
, then prepend all install commands with sudo
.
Build Cheerp/2: utilities and libraries, stable version
Build latest version
This allows one to benefit from the latest developments and bug fixes, but we reserve the possibility of forward-incompatible changes.
Get the sources, latest version
You need to get all the sources first. Please define the CHEERP_DEST
environment variable that will be used in various commands.
Quickstart
To quickly build everything, just run cd cheerp-compiler && ./debian/build.sh
.
Build Cheerp/1: compiler, latest version
By default Cheerp will be installed in /opt/cheerp
, with the main executable at /opt/cheerp/bin/clang++
.
If you need write privileges to /opt/cheerp
, then prepend all install commands with sudo
.
Build Cheerp/2: utilities and libraries, latest version
Cheerp unit tests
In order to run the unit tests you will have to have a JavaScript engine installed. We recommend NodeJS, installation instructions can be found here: https://nodejs.org/en/download/package-manager
This command will compile and execute the Cheerp test suite.