- C++11 compatible compiler
- CMake
- GMP (GNU multiprecision library)
Setting up a basic release build using make
:
git clone https://github.com/leanprover/lean
cd lean
mkdir -p build/release
cd build/release
cmake ../../src
make
Setting up a basic debug build using make
:
git clone https://github.com/leanprover/lean
cd lean
mkdir -p build/debug
cd build/debug
cmake -D CMAKE_BUILD_TYPE=DEBUG ../../src
make
Pass these along with the cmake ../../src
command.
-
-G Ninja
CMake 2.8.11 supports the Ninja build system. Some people report that using Ninja can reduce the build time, esp when a build is incremental. Callninja
instead ofmake
to build the project. -
-D CMAKE_BUILD_TYPE=
Select the build type. Valid values areRELEASE
(default),DEBUG
,RELWITHDEBINFO
, andMINSIZEREL
. -
-D CMAKE_CXX_COMPILER=
Select the C++ compiler to use. -
-D LEAN_IGNORE_OLEAN_VERSION
The.olean
files are tagged with the Lean version they were produced with. This means that by default, the core library has to be recompiled after e.g. everygit commit
. Use this option to avoid the version check. The.olean
files can be removed manually by invokingmake/ninja clean-olean
.
- Using CCache to avoid recompilation
- Measuring Code Coverage
- Compiling Lean with Split Stacks