From 5e10b0e647910c6f23881e19b09e91295e1483d8 Mon Sep 17 00:00:00 2001 From: Giovanni Bussi <giovanni.bussi@gmail.com> Date: Sun, 20 May 2018 11:43:52 +0200 Subject: [PATCH] Added plumedcheck that wrapper is not used --- src/maketools/plumedcheck | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/maketools/plumedcheck b/src/maketools/plumedcheck index 97a068c86..6ad9344fb 100755 --- a/src/maketools/plumedcheck +++ b/src/maketools/plumedcheck @@ -215,6 +215,14 @@ BEGINFILE{ for(mod in used_modules[module]) used_modules_here=used_modules_here " " mod } information("used_modules",module " uses:" used_modules_here) +# DOC: :used_wrapper_module: +# DOC: Wrapper module should not be used in other modules (via `USE=wrapper` in `Makefile`). +# DOC: The reason is that this makes `libplumedKernel` dependent on the PLUMED wrappers. +# DOC: An exception is the `main` module, which needs to use the `wrapper` module. +# DOC: Notice that within the PLUMED library there is no need to use the external `cmd` interface +# DOC: since one can directly declare a `PlumedMain` object. + if(!(module in outer_modules) && isarray(used_modules[module]) && ("wrapper" in used_modules[module])) + error("used_wrapper_module","wrapped module should not be used except in main") } } } -- GitLab