1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-01-11 23:53:21 +00:00

Remove use of boost system and filesystem (#1591)

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
myrtle 2025-10-22 15:01:21 +02:00 committed by GitHub
parent 9ccd132437
commit c7cfb0aa4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 13 additions and 14 deletions

View File

@ -169,7 +169,7 @@ else()
endif()
endif()
set(boost_libs filesystem program_options iostreams system)
set(boost_libs program_options iostreams)
if (Threads_FOUND)
list(APPEND boost_libs thread)
endif()

View File

@ -4,12 +4,10 @@ project(bba CXX)
set(CMAKE_CXX_STANDARD 17)
find_package(Boost REQUIRED COMPONENTS
program_options
system)
program_options)
add_executable(bbasm
main.cc)
target_link_libraries(bbasm LINK_PRIVATE
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_SYSTEM_LIBRARY})
${Boost_PROGRAM_OPTIONS_LIBRARY})
export(TARGETS bbasm FILE ${CMAKE_BINARY_DIR}/bba-export.cmake)

View File

@ -28,9 +28,9 @@
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/program_options.hpp>
#include <cinttypes>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <random>
@ -276,14 +276,14 @@ bool CommandHandler::parseOptions()
bool CommandHandler::executeBeforeContext()
{
if (vm.count("help") || argc == 1) {
std::cerr << boost::filesystem::path(argv[0]).stem()
std::cerr << std::filesystem::path(argv[0]).stem()
<< " -- Next Generation Place and Route (Version " GIT_DESCRIBE_STR ")\n";
std::cerr << options << "\n";
return argc != 1;
}
if (vm.count("version")) {
std::cerr << boost::filesystem::path(argv[0]).stem()
std::cerr << std::filesystem::path(argv[0]).stem()
<< " -- Next Generation Place and Route (Version " GIT_DESCRIBE_STR ")\n";
return true;
}

View File

@ -3,7 +3,7 @@
#define NOMINMAX
#include <windows.h>
#endif
#include <boost/filesystem.hpp>
#include <filesystem>
#include <boost/iostreams/device/mapped_file.hpp>
#include "embed.h"
#include "nextpnr.h"
@ -17,7 +17,7 @@ const void *get_chipdb(const std::string &filename)
static std::map<std::string, boost::iostreams::mapped_file> files;
if (!files.count(filename)) {
std::string full_filename = EXTERNAL_CHIPDB_ROOT "/" + filename;
if (boost::filesystem::exists(full_filename))
if (std::filesystem::exists(full_filename))
files[filename].open(full_filename, boost::iostreams::mapped_file::priv);
}
if (files.count(filename))

View File

@ -36,7 +36,7 @@
#include "pack.h"
#include "validity_check.h"
#include <boost/filesystem.hpp>
#include <filesystem>
NEXTPNR_NAMESPACE_BEGIN
@ -62,7 +62,7 @@ struct FabulousImpl : ViaductAPI
ViaductAPI::init(ctx);
h.init(ctx);
fab_root = get_env_var("FAB_ROOT", ", set it to the fabulous build output or project path");
if (boost::filesystem::exists(fab_root + "/.FABulous"))
if (std::filesystem::exists(fab_root + "/.FABulous"))
is_new_fab = true;
else
is_new_fab = false;

View File

@ -18,7 +18,6 @@
*/
#include "arch.h"
#include <boost/filesystem/path.hpp>
#include "archdefs.h"
#include "chipdb.h"
#include "log.h"
@ -31,6 +30,8 @@
#include "router2.h"
#include "util.h"
#include <filesystem>
NEXTPNR_NAMESPACE_BEGIN
static constexpr int database_version = 6;
@ -124,7 +125,7 @@ void Arch::load_chipdb(const std::string &path)
db_path = proc_share_dirname();
db_path += "himbaechel/";
db_path += path;
boost::filesystem::path p(db_path);
std::filesystem::path p(db_path);
db_path = p.make_preferred().string();
}
try {