Commit 38350d71 authored by Pries, Jason's avatar Pries, Jason

Replace boost::filesystem with std::experimental::filesystem

This eliminates all Boost library dependencies
parent 07c274f3
......@@ -2,13 +2,10 @@ cmake_minimum_required(VERSION 3.2)
project(Oersted)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 --coverage")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
find_package(Boost REQUIRED COMPONENTS system filesystem)
include_directories(${Boost_INCLUDE_DIR})
include_directories(./lib/)
include_directories(./lib/Eigen/)
include_directories(./lib/GoogleTest/googletest/include/gtest)
......
......@@ -2,7 +2,6 @@
Mesh::Mesh(Sketch &sketch) {
Boundary = sketch.boundary();
for (size_t i = 0; i != sketch.size_curves(); ++i) {
auto c = sketch.curve(i);
if (!(c->for_construction())) {
......@@ -892,8 +891,8 @@ void Mesh::save_as(std::string path, std::string file_name) const {
This is a stub for visualization
*/
if (!boost::filesystem::exists(path)) {
boost::filesystem::create_directories(path);
if (!std::experimental::filesystem::exists(path)) {
std::experimental::filesystem::create_directories(path);
}
std::fstream fs;
......
......@@ -363,8 +363,8 @@ public:
}
void write_scalar(Eigen::VectorXd const &v, std::string path, std::string file_name) const override {
if (!boost::filesystem::exists(path)) {
boost::filesystem::create_directories(path);
if (!std::experimental::filesystem::exists(path)) {
std::experimental::filesystem::create_directories(path);
}
std::fstream fs;
......@@ -403,8 +403,8 @@ public:
}
void write_vector(Eigen::ArrayXd const &Fx, Eigen::ArrayXd const &Fy, std::string path, std::string file_name) const override {
if (!boost::filesystem::exists(path)) {
boost::filesystem::create_directories(path);
if (!std::experimental::filesystem::exists(path)) {
std::experimental::filesystem::create_directories(path);
}
std::fstream fs;
......
......@@ -183,8 +183,8 @@ void Sketch::save_as<SaveMethod::Rasterize>(std::string path, std::string file_n
This is a stub for visualization
*/
if (!boost::filesystem::exists(path)) {
boost::filesystem::create_directories(path);
if (!std::experimental::filesystem::exists(path)) {
std::experimental::filesystem::create_directories(path);
}
std::fstream fs;
......
......@@ -10,7 +10,7 @@
#include <vector>
#include <iostream>
#include <boost/filesystem.hpp>
#include <experimental/filesystem>
#include "Eigen"
......
......@@ -35,4 +35,4 @@ set(SOURCE_FILES
add_executable(run_tests ${SOURCE_FILES})
target_link_libraries(run_tests gtest gtest_main sketch mesh physics quadrature)
\ No newline at end of file
target_link_libraries(run_tests gtest gtest_main sketch mesh physics quadrature stdc++fs)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment