From 9bf78dba1a5520b3d50a8d9ac74f0c0c12e46e59 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 31 Jan 2019 20:12:57 +0000 Subject: Remove boost::filesystem in favour of std::filesystem --- libpqpp/Jamfile.jam | 4 ++-- libpqpp/pq-connection.h | 1 - libpqpp/pq-mock.cpp | 2 +- libpqpp/pq-mock.h | 4 ++-- libpqpp/unittests/Jamfile.jam | 10 +++++----- libpqpp/unittests/testpq.cpp | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/libpqpp/Jamfile.jam b/libpqpp/Jamfile.jam index b1578ab..2b31d95 100644 --- a/libpqpp/Jamfile.jam +++ b/libpqpp/Jamfile.jam @@ -4,7 +4,7 @@ lib pq ; lib adhocutil : : : : /usr/include/adhocutil ; lib dbppcore : : : : /usr/include/dbpp ; lib boost_date_time ; -lib boost_system ; +lib stdc++fs ; alias libpq : : : : "-I`pg_config --includedir`" @@ -19,7 +19,7 @@ lib dbpp-postgresql : adhocutil dbppcore boost_date_time - boost_system + stdc++fs : : . "-I`pg_config --includedir`" diff --git a/libpqpp/pq-connection.h b/libpqpp/pq-connection.h index 4544b79..18a0198 100644 --- a/libpqpp/pq-connection.h +++ b/libpqpp/pq-connection.h @@ -48,7 +48,6 @@ namespace PQ { private: static bool checkResultInt(PGresult * res, int expected, int alternative); }; - typedef boost::shared_ptr ConnectionPtr; } #endif diff --git a/libpqpp/pq-mock.cpp b/libpqpp/pq-mock.cpp index c563bb2..20ce724 100644 --- a/libpqpp/pq-mock.cpp +++ b/libpqpp/pq-mock.cpp @@ -10,7 +10,7 @@ NAMEDFACTORY("postgresql", PQ::Mock, DB::MockDatabaseFactory); namespace PQ { -Mock::Mock(const std::string & masterdb, const std::string & name, const std::vector & ss) : +Mock::Mock(const std::string & masterdb, const std::string & name, const std::vector & ss) : MockServerDatabase(masterdb, name, "postgresql") { CreateNewDatabase(); diff --git a/libpqpp/pq-mock.h b/libpqpp/pq-mock.h index 8ab2fe1..685b75c 100644 --- a/libpqpp/pq-mock.h +++ b/libpqpp/pq-mock.h @@ -2,14 +2,14 @@ #define MOCKPQDATASOURCE_H #include -#include +#include #include #include "pq-connection.h" namespace PQ { class DLL_PUBLIC Mock : public DB::MockServerDatabase { public: - Mock(const std::string & master, const std::string & name, const std::vector & ss); + Mock(const std::string & master, const std::string & name, const std::vector & ss); ~Mock(); DB::ConnectionPtr openConnection() const override; diff --git a/libpqpp/unittests/Jamfile.jam b/libpqpp/unittests/Jamfile.jam index 85abb80..577b70c 100644 --- a/libpqpp/unittests/Jamfile.jam +++ b/libpqpp/unittests/Jamfile.jam @@ -3,22 +3,22 @@ import testing ; path-constant me : . ; lib boost_utf : : boost_unit_test_framework ; -lib boost_filesystem ; -lib boost_system ; +lib stdc++fs ; lib dbpptestcore : : : : /usr/include/dbpp ; lib adhocutil : : : : /usr/include/adhocutil ; run testpq.cpp - : : : + : : + pqschema.sql + : ROOT=\"$(me)\" BOOST_TEST_DYN_LINK ..//dbpp-postgresql dbpptestcore adhocutil boost_utf - boost_filesystem - boost_system + stdc++fs : testpq ; diff --git a/libpqpp/unittests/testpq.cpp b/libpqpp/unittests/testpq.cpp index 4f36ae7..954366a 100644 --- a/libpqpp/unittests/testpq.cpp +++ b/libpqpp/unittests/testpq.cpp @@ -152,7 +152,7 @@ BOOST_AUTO_TEST_CASE( testP2MockScriptDir ) while (select->fetch()) { std::string path; (*select)[0] >> path; - BOOST_REQUIRE(boost::filesystem::exists(path)); + BOOST_REQUIRE(std::filesystem::exists(path)); } } -- cgit v1.2.3