Skip to content

Commit

Permalink
Fix build when libraries can not be found
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf committed Apr 22, 2024
1 parent 3d914ed commit 9d4ec29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/metatensor/metatensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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` "
Expand Down

0 comments on commit 9d4ec29

Please sign in to comment.