Compile plugins in Docker with optimized version

Hi everyone,
I’m a beginner user and I’m trying to run a model with additional plugins and using the optimized version.
I’ve installed ASPECT from Docker and when I open a container I see both aspect and aspect-release in the main directory.
However, since there is not a ‘release’ directory, I do not understand how to compile the plugin using the release version.
At the moment I’ve found two methods to do that:

  1. inside ~/aspect/bin rename the ‘aspect’ file as ‘aspect-debug’ and the ‘aspect-release’ file as ‘aspect’ and then I can compile the plugin with the release version with cmake -DAspect_DIR=~/aspect/ .
  2. in ~/aspect I created ~/aspect/release (mkdir release), then inside ~/aspect/release:
    * cmake …/
    * make release
    * make
    and finally I can compile the plugin with cmake -DAspect_DIR=~/aspect/release .
    Since the first solution is extremely inelegant and the latter takes some time, I was wondering if there is a solution to make it in a better way.

Thanks so much for your help,
Alessandro

Alessandro:
I agree that neither of these two approaches are particularly elegant, though they both work. A perhaps simpler approach is to create two build directories. In one you build the release version, in the other you build the debug version. Then, for your plugin, you also create two directories that hold the release and debug versions of the plugin. If you get the paths right, you can use the same .prm file for both debug and release runs.
Best
W.

We have implemented a much easier solution, which is implemented in ASPECT 2.5.0 but only enabled by default in the current development version:
There is a new build type “DebugRelease” that builds both versions of ASPECT in a single build directory and plugins are also compiled for both versions automatically. Depending on the version you are using, you might need to manually change the build type.
See the manual for more information:
https://aspect-documentation.readthedocs.io/en/latest/user/run-aspect/debug-mode.html