add a cmake option to switch between std and boost filesystem

This commit is contained in:
Chunting Gu
2021-05-27 11:15:08 +08:00
parent 39719c4ded
commit df96f969bc
31 changed files with 227 additions and 195 deletions
+3 -6
View File
@@ -1,13 +1,10 @@
#include <iostream>
#include "boost/filesystem/operations.hpp"
#include "webcc/fs.h"
#include "webcc/logger.h"
#include "book_client.h"
namespace bfs = boost::filesystem;
// -----------------------------------------------------------------------------
void PrintSeparator() {
@@ -39,8 +36,8 @@ int main(int argc, char* argv[]) {
std::string url = argv[1];
bfs::path photo_dir = argv[2];
if (!bfs::is_directory(photo_dir) || !bfs::exists(photo_dir)) {
webcc::fs::path photo_dir = argv[2];
if (!webcc::fs::is_directory(photo_dir) || !webcc::fs::exists(photo_dir)) {
std::cerr << "Invalid photo dir!" << std::endl;
return 1;
}