From ea5a689876a3840b18bef2eb6631d363d8885646 Mon Sep 17 00:00:00 2001 From: Gauthier Folzan Date: Mon, 6 Apr 2020 10:23:12 +0200 Subject: [PATCH] small explanation about how to create a new module --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0658fe1..e719bb3 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,28 @@ Install dune modules ``` spack install dune-python ``` -## Use +## Use a module To use dune-python, load the module ``` source $SPACK_ROOT/share/spack/setup-env.sh spack load dune-python ``` + +## Build a new module +### Initialize developement environment +``` +source $SPACK_ROOT/share/spack/setup-env.sh +spack install --only=dependencies dune-newmodule +spack build-env dune-newmodule $SHELL +``` +### Initialize dune project +``` +duneproject +``` +Answer the questions about the new modules, enter the project folder and compile with standard cmake +``` +mkdir build +cd build +cmake .. +cmake --build . +``