replace boost filesystem with std filesystem; upgrade gtest and find it using cmake.

This commit is contained in:
Chunting Gu
2020-02-15 12:04:51 +08:00
parent 7e3da65e73
commit 7e7ab1c1e8
72 changed files with 233 additions and 31551 deletions
+5 -6
View File
@@ -1,12 +1,13 @@
// A client posting multipart form data.
#include <filesystem>
#include <iostream>
#include "boost/filesystem.hpp"
#include "webcc/client_session.h"
#include "webcc/logger.h"
namespace sfs = std::filesystem;
int main(int argc, char* argv[]) {
if (argc < 2) {
std::cout << "usage: form_client <upload_dir> [url]" << std::endl;
@@ -22,7 +23,7 @@ int main(int argc, char* argv[]) {
WEBCC_LOG_INIT("", webcc::LOG_CONSOLE);
const webcc::Path upload_dir(argv[1]);
const sfs::path upload_dir(argv[1]);
std::string url;
if (argc == 3) {
@@ -31,9 +32,7 @@ int main(int argc, char* argv[]) {
url = "http://httpbin.org/post";
}
namespace bfs = boost::filesystem;
if (!bfs::is_directory(upload_dir) || !bfs::exists(upload_dir)) {
if (!sfs::is_directory(upload_dir) || !sfs::exists(upload_dir)) {
std::cerr << "Invalid upload dir!" << std::endl;
return 1;
}