Here are the steps to build Pastel in Linux. The same steps work in Windows with small changes.
Since Pastel uses C++20, it requires a recent compiler to be built. The following work:
| Operating system | Compiler |
|---|---|
| Windows | Visual Studio 2019 16.11.5 or later |
| Linux | Gcc 11 or later |
| Linux | Clang ? or later |
| MacOsX | XCode ? or later |
git clone https://github.com/kaba2/pastel
cd pastel
git checkout 1.6.0
In the directory Pastel was cloned to (e.g. pastel):
git clone https://github.com/microsoft/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate bash
bootstrap-vcpkg
vcpkg integrate install
In the directory vcpkg was cloned to (e.g. pastel/vcpkg):
./vcpkg install boost
./vcpkg install tbb
./vcpkg install range-v3
./vcpkg install eigen3
vcpkg install boost
vcpkg install tbb
vcpkg install range-v3
vcpkg install eigen3
In the directory Pastel was cloned to (e.g. pastel):
cmake -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo -B build
Pastel comes with the standard CMake build-configurations, which are
The Debug configuration enables debugging information and ASSERTs and PENSUREs. The RelWithDebInfo configuration disables ASSERTs and PENSUREs, but enables debug information. The Release configuration disables both.
| Property / Config | Debug | Release | RelWithDebInfo |
|---|---|---|---|
| ASSERT and PENSURE | x | ||
| ENSURE | x | x | x |
| Debug information | x | x |
Compile and link the toolset-specific build files.
cd build
make -j 4
The j option specifies the number of threads to use in the building process. On multi-core machines this shortens the build-times dramatically.
start build/Pastel.sln
To build Pastel in XCode:
build/Pastel.xcodeproj.