BUILD THE SPIRIT LIBRARY¶
C/C++ Library ¶
|gcc||>= 5.1 (C++11 stdlib) or any modern compiler|
This is pretty much a standalone library and should be easy to implement into existing
projects in which CMake is already used.
It can be built as shared or static and API headers are located in
|SPIRIT_USE_CUDA||Use CUDA to speed up numerically intensive parts of the core|
|SPIRIT_USE_OPENMP||Use OpenMP to speed up numerically intensive parts of the core|
|SPIRIT_SCALAR_TYPE||Should be e.g.
|SPIRIT_BUILD_TEST||Build unit tests for the core library|
|SPIRIT_BUILD_FOR_CXX||Build the static library for C++ applications|
|SPIRIT_BUILD_FOR_JULIA||Build the shared library for Julia|
|SPIRIT_BUILD_FOR_PYTHON||Build the shared library for Python|
Note that the CMake Options for the core library are also set in the root CMakeLists.txt.
Integrating into other CMake Projects¶
This is currently untested, but you should be able to use Spirit either via
You should thus be able to simply copy the
core directory as
the thirdparty folder of your Project and use it as is done commonly.
Note that setting
qhull_INCLUDE_DIRS if qhull is present on
your disk removes the need for Spirit to clone and build it separately.
A set of CMake variables is pushed to the parent scope by the core CMakeLists. These include:
Unit Tests ¶
|gcc||>= 4.8.1 (C++11 stdlib) or any modern compiler|
|Python||>= 2.7 or >= 3.5 (for the python tests)|
The core library includes a set of unit tests in order to make sure certain conditions are
fulfilled by the librarys functions.
CTest for unit testing.
You can run
cd build && ctest --output-on-failure && cd ..
or execute any of the test executables manually.
To execute the tests from the Visual Studio IDE, simply rebuild the
|CORE_BUILD_TEST||Build unit tests for the core library|
|BUILD_UI_PYTHON||Python tests are only built if this is ON|
Python Package ¶
|Python||>= 2.7 or >= 3.5|
|BUILD_UI_PYTHON||Build the shared library for python|
|CORE_BUILD_TEST||Will build python unit tests if the shared lib for python is built|
You may use the python package simply by adding a
path/to/Spirit/core/python to your
To build a proper python package including binary wheel, you need to build the shared library for Python and then execute
cd path/to/Spirit/core/python python setup.py sdist bdist_wheel
The resulting package can then be installed with e.g.
pip install -e /path/to/package/dist/spirit-<tags>.whl