diff --git a/interface/CPP/model_factory_softsaft.cpp b/interface/CPP/model_factory_softsaft.cpp index 331d1ea..a48692b 100644 --- a/interface/CPP/model_factory_softsaft.cpp +++ b/interface/CPP/model_factory_softsaft.cpp @@ -1,11 +1,24 @@ #include "teqp/cpp/teqpcpp.hpp" #include "teqp/cpp/deriv_adapter.hpp" + + +#include "model_flags.hpp" // Contains (optionally) macros to disable various models + +#ifndef DISABLE_SOFTSAFT #include "teqp/models/saft/softsaft.hpp" +#endif + namespace teqp{ namespace cppinterface{ +#ifndef DISABLE_SOFTSAFT std::unique_ptr make_SOFTSAFT(const nlohmann::json &spec){ return teqp::cppinterface::adapter::make_owned(saft::softsaft::SoftSAFT(spec)); } +#else + std::unique_ptr make_SOFTSAFT(const nlohmann::json &){ + throw teqp::NotImplementedError("The soft SAFT model has been disabled"); + } +#endif } }