mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-24 01:16:24 -06:00
remove boost::filesystem as dependency
This commit is contained in:
parent
0e45f0827c
commit
04812f32fb
@ -137,20 +137,20 @@ public:
|
||||
* The input can either be the canonical deck file name or the name of the case
|
||||
* (i.e., without the .DATA extension)
|
||||
*/
|
||||
static boost::filesystem::path canonicalDeckPath(const std::string& caseName)
|
||||
static Opm::filesystem::path canonicalDeckPath(const std::string& caseName)
|
||||
{
|
||||
const auto fileExists = [](const boost::filesystem::path& f) -> bool
|
||||
const auto fileExists = [](const Opm::filesystem::path& f) -> bool
|
||||
{
|
||||
if (!boost::filesystem::exists(f))
|
||||
if (!Opm::filesystem::exists(f))
|
||||
return false;
|
||||
|
||||
if (boost::filesystem::is_regular_file(f))
|
||||
if (Opm::filesystem::is_regular_file(f))
|
||||
return true;
|
||||
|
||||
return boost::filesystem::is_symlink(f) && boost::filesystem::is_regular_file(boost::filesystem::read_symlink(f));
|
||||
return Opm::filesystem::is_symlink(f) && Opm::filesystem::is_regular_file(Opm::filesystem::read_symlink(f));
|
||||
};
|
||||
|
||||
auto simcase = boost::filesystem::path(caseName);
|
||||
auto simcase = Opm::filesystem::path(caseName);
|
||||
if (fileExists(simcase))
|
||||
return simcase;
|
||||
|
||||
@ -557,9 +557,9 @@ private:
|
||||
outputDir = ioConfig.getOutputDir();
|
||||
|
||||
// ensure that the output directory exists and that it is a directory
|
||||
if (!boost::filesystem::is_directory(outputDir)) {
|
||||
if (!Opm::filesystem::is_directory(outputDir)) {
|
||||
try {
|
||||
boost::filesystem::create_directories(outputDir);
|
||||
Opm::filesystem::create_directories(outputDir);
|
||||
}
|
||||
catch (...) {
|
||||
throw std::runtime_error("Creation of output directory '"+outputDir+"' failed\n");
|
||||
|
@ -68,9 +68,9 @@ enum class FileOutputMode {
|
||||
|
||||
static void ensureOutputDirExists(const std::string& cmdline_output_dir)
|
||||
{
|
||||
if (!boost::filesystem::is_directory(cmdline_output_dir)) {
|
||||
if (!Opm::filesystem::is_directory(cmdline_output_dir)) {
|
||||
try {
|
||||
boost::filesystem::create_directories(cmdline_output_dir);
|
||||
Opm::filesystem::create_directories(cmdline_output_dir);
|
||||
}
|
||||
catch (...) {
|
||||
throw std::runtime_error("Creation of output directory '" + cmdline_output_dir + "' failed\n");
|
||||
@ -86,7 +86,7 @@ static FileOutputMode setupLogging(int mpi_rank_, const std::string& deck_filena
|
||||
}
|
||||
|
||||
// create logFile
|
||||
using boost::filesystem::path;
|
||||
using Opm::filesystem::path;
|
||||
path fpath(deck_filename);
|
||||
std::string baseName;
|
||||
std::ostringstream debugFileStream;
|
||||
|
@ -20,7 +20,7 @@ set (opm-simulators_DEPS
|
||||
"C99"
|
||||
# Various runtime library enhancements
|
||||
"Boost 1.44.0
|
||||
COMPONENTS date_time filesystem system unit_test_framework REQUIRED"
|
||||
COMPONENTS date_time system unit_test_framework REQUIRED"
|
||||
# DUNE prerequisites
|
||||
"dune-common REQUIRED"
|
||||
"dune-istl REQUIRED"
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
@ -650,7 +650,7 @@ BOOST_AUTO_TEST_CASE(ParseInterpolateRealisticVFPPROD)
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::ErrorGuard errorGuard;
|
||||
Opm::Parser parser;
|
||||
boost::filesystem::path file("VFPPROD2");
|
||||
Opm::filesystem::path file("VFPPROD2");
|
||||
|
||||
auto deck = parser.parseFile(file.string());
|
||||
Opm::checkDeck(deck, parser, parseContext, errorGuard);
|
||||
|
@ -27,7 +27,6 @@
|
||||
|
||||
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
|
Loading…
Reference in New Issue
Block a user