Building Spirit’s Framework Components¶
The Spirit framework is designed to run across different platforms
and so the build process is set up with
CMake, which will generate
the appropriate build scripts for each platform.
Please be aware that our CMake scripts are written for our use cases and you may need to adapt some paths and options in the Root CMakeLists.txt.
General Build Process ¶
The following assumes you are in the Spirit root directory.
There are some important Options you may need to consider. You can find them under ### Build Flags ### in the Root CMakeLists.txt. Otherwise, the developers’ defaults will be used.
Some Paths you can set under ### User Paths ### (just uncomment the corresponding line) are:
|Name of the compiler you wish to use
|Directory your compiler is located in
|use the default IFF (FZJ) cluster paths
Clear the build directory using
rm -rf build && mkdir build
Further helper scripts for clean-up are
Generate Build Files¶
./cmake.sh lets cmake generate makefiles for your system inside a ‘build’ folder.
cd build && cmake .. && cd ..
-debug to the script will cause it to create a debug configuration,
meaning that you will be able to properly debug the entire application.
On Windows (no MSys) you can simply use the git bash to do this or use the CMake GUI. When using MSys etc., CMake will create corresponding MSys makefiles.
Building the Projects¶
To execute the build and linking of the executable, simply call
cd build && make -jN && cd ..
-jN is optional, with
N the number of parallel build processes you want to create.
On Windows (no MSys), CMake will by default have generated a Visual Studio Solution. Open the generated Solution in the Visual Studio IDE and build it there.
Running the Unit Tests¶
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
This is not yet supported! however, you can already run
cd build && make install && cd ..
Which on OSX should build a .app bundle.
Core Library ¶
For detailed build instructions concerning the standalone core library or how to include it in your own project, see core/docs/BUILD.md.
- Shared and static library
- Python bindings
- Julia bindings
- Unit Tests
The Root CMakeLists.txt has a few options you can set:
|Use CUDA to speed up numerically intensive parts of the core
|Use OpenMP to speed up numerically intensive parts of the core
|Should be e.g.
float. Sets the C++ type for scalar variables, arrays etc.
|Build unit tests for the core library
|Build the static library for C++ applications
|Build the shared library for Julia
|Build the shared library for Python
Desktop User Interface ¶
|>= 5.7 including QT-Charts
Note that in order to build with QT as a dependency on Windows, you may need to add
path/to/qt/qtbase/bin to your PATH variable.
Necessary OpenGL drivers should be available through the regular drivers for any remotely modern graphics card.
|Build the C++ interfaces (console or QT) instead of others
|Build qt user interface instead of console version
|The path to your CMake installation
|On OSX, create .app bundle (not yet fully functional)