disable json input for boost 1.48

This commit is contained in:
Arne Morten Kvarving 2020-02-17 14:10:01 +01:00
parent 76682497e8
commit 226a6cb434
3 changed files with 11 additions and 3 deletions

View File

@ -21,6 +21,7 @@
#include <opm/simulators/linalg/setupPropertyTree.hpp>
#include <boost/version.hpp>
#include <boost/property_tree/json_parser.hpp>
namespace Opm
@ -35,9 +36,12 @@ boost::property_tree::ptree
setupPropertyTree(const FlowLinearSolverParameters& p)
{
boost::property_tree::ptree prm;
#if BOOST_VERSION / 100 % 1000 > 48
if (p.linear_solver_configuration_json_file_ != "none") {
boost::property_tree::read_json(p.linear_solver_configuration_json_file_, prm);
} else {
} else
#endif
{
prm.put("tol", p.linear_solver_reduction_);
prm.put("maxiter", p.linear_solver_maxiter_);
prm.put("verbosity", p.linear_solver_verbosity_);

View File

@ -21,10 +21,12 @@
#define BOOST_TEST_MODULE OPM_test_FlexibleSolver
#include <boost/test/unit_test.hpp>
#include <boost/version.hpp>
#include <dune/common/version.hh>
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 6)
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 6) && \
BOOST_VERSION / 100 % 1000 > 48
#include <opm/simulators/linalg/FlexibleSolver.hpp>

View File

@ -21,10 +21,12 @@
#define BOOST_TEST_MODULE OPM_test_PreconditionerFactory
#include <boost/test/unit_test.hpp>
#include <boost/version.hpp>
#include <dune/common/version.hh>
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 6)
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 6) && \
BOOST_VERSION / 100 % 1000 > 48
#include <opm/simulators/linalg/PreconditionerFactory.hpp>
#include <opm/simulators/linalg/FlexibleSolver.hpp>