Regular build:
mkdir build && cd build
cmake ..
cmake --build . -j$(nproc)
For building with debugging symbols use:
cmake .. -DCMAKE_BUILD_TYPE=Debug
For extra build output use:
cmake --build . -j$(nproc) -v
It may be convenient to use tool GUI:
cmake-gui -S . -B build
In Advanced Mode you may set paths for auxiliary libraries (e.g. BLAS).
Build all examples:
cmake .. -DBUILD_EXAMPLES=ON
Build specific example:
cmake .. -DBUILD_EXAMPLES=ON -DBUILD_ALL_EXAMPLES=OFF \
-DBUILD_ADVECTION_DIFFUSION_STABILIZATION_SANDBOX_2D=ON
Each example folder has CMakeLists.txt
file, where you can lookup build flag for the example.
Simulation projects are located under simulations
.
In order to create a new simulation:
simulations/default
folder with different name. Let's say that the new folder is
simulations/newsim
default
with the unique one in simulations/newsim/CMakeLists.txt
add_subdirectory(newsim)
to the simulations/CMakeLists.txt
build/simulations/newsim
folderWith Docker you can run your simulations using containerized development environment.
Run your simulation in three steps:
docker build -t sparselizard_debian_testing:latest -f docker/debian-testing.dockerfile .
docker run -it --rm -v "$(pwd):/workdir" sparselizard_debian_testing
Notes:
docker/debian-testing.dockerfile