From b810fece4f4a02a02d912d832b3b44ecff4d5894 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Mon, 22 Apr 2024 18:47:12 +0200 Subject: [PATCH] Fix build when libraries can not be found --- src/metatensor/metatensor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/metatensor/metatensor.cpp b/src/metatensor/metatensor.cpp index 981cbfcbd7..ea3c55a146 100644 --- a/src/metatensor/metatensor.cpp +++ b/src/metatensor/metatensor.cpp @@ -71,7 +71,11 @@ namespace PLMD { namespace metatensor { class MetatensorPlumedAction: public ActionAtomistic, public ActionWithValue { public: static void registerKeywords(Keywords& keys); - explicit MetatensorPlumedAction(const ActionOptions&) { + explicit MetatensorPlumedAction(const ActionOptions&): + Action(options), + ActionAtomistic(options), + ActionWithValue(options) + { throw std::runtime_error( "Can not use metatensor action without the corresponding libraries. \n" "Make sure to configure with `--enable-metatensor --enable-libtorch` "