bluestore/bluestore_tool.cc)
target_link_libraries(ceph-bluestore-tool
os global)
+ # TODO: drop this linkage once we don't need to build on bionic
+ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
+ target_link_libraries(ceph-bluestore-tool
+ Boost::filesystem)
+ endif()
install(TARGETS ceph-bluestore-tool
DESTINATION bin)
endif()
#if __has_include(<filesystem>)
#include <filesystem>
namespace fs = std::filesystem;
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace fs = std::experimental::filesystem;
+#else
+#include <boost/filesystem.hpp>
+namespace fs = boost::filesystem;
#endif
#include <iostream>
#include <fstream>
BlueFS::FileWriter *h;
fs::path file_path(dest_file);
- const string dir = file_path.parent_path();
- const string file_name = file_path.filename();
+ const string dir = file_path.parent_path().native();
+ const string file_name = file_path.filename().native();
bs->open_for_write(dir, file_name, &h, false);
uint64_t max_block = 4096;
char buf[max_block];