This section describes how to build the Pastel library.
Since Pastel uses C++14, it requires a recent compiler to be built. The following work:
The steps to build Pastel are as follows:
See the dependencies page.
Pastel uses the CMake build-script generator to abstract away the specifics of a given build-environment. CMake is a program which reads in a generic build-script and outputs a tool-specific build-script (e.g. Unix makefiles, Visual Studio projects, etc.)
CMake can be downloaded from here.
Modify the directories to refer to the locations you installed the external libraries at:
Advancedbutton is not checked.
If you want to change the tool-set later, you need to remove the
CMakeCache.txt file, and run these instructions again. The purpose of this file is to remember options so that they need not specified repeatedly.
For a single-configuration tool-set, such as makefiles, you choose a debug build by choosing
Debug as the
cmake-gui. For a multiple-configuration tool-set, such as Visual Studio or XCode, you choose the debug configuration from inside the IDE. Similarly for other build-types.
Pastel comes with the standard CMake build configurations, which are
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|
When CMake has generated the build-scripts, you probably already know how to proceed. However, here are some specific examples.
build/ directory, run
make -j 4
j option specifies the number of threads to use in the building process. On multi-core machines this shortens the build-times dramatically.
To build Pastel using Visual Studio:
To build Pastel in XCode 4:
The libraries will be placed in the
lib/toolset/config directory, and the executables will be placed in the
bin/toolset/config directory, where the
toolset is the used tool-set, and
config is the used configuration.