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:
parent
9ccd132437
commit
c7cfb0aa4b
@ -169,7 +169,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(boost_libs filesystem program_options iostreams system)
|
set(boost_libs program_options iostreams)
|
||||||
if (Threads_FOUND)
|
if (Threads_FOUND)
|
||||||
list(APPEND boost_libs thread)
|
list(APPEND boost_libs thread)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -4,12 +4,10 @@ project(bba CXX)
|
|||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
find_package(Boost REQUIRED COMPONENTS
|
find_package(Boost REQUIRED COMPONENTS
|
||||||
program_options
|
program_options)
|
||||||
system)
|
|
||||||
|
|
||||||
add_executable(bbasm
|
add_executable(bbasm
|
||||||
main.cc)
|
main.cc)
|
||||||
target_link_libraries(bbasm LINK_PRIVATE
|
target_link_libraries(bbasm LINK_PRIVATE
|
||||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||||
${Boost_SYSTEM_LIBRARY})
|
|
||||||
export(TARGETS bbasm FILE ${CMAKE_BINARY_DIR}/bba-export.cmake)
|
export(TARGETS bbasm FILE ${CMAKE_BINARY_DIR}/bba-export.cmake)
|
||||||
|
|||||||
@ -28,9 +28,9 @@
|
|||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#include <boost/algorithm/string/join.hpp>
|
#include <boost/algorithm/string/join.hpp>
|
||||||
#include <boost/filesystem/path.hpp>
|
|
||||||
#include <boost/program_options.hpp>
|
#include <boost/program_options.hpp>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <random>
|
#include <random>
|
||||||
@ -276,14 +276,14 @@ bool CommandHandler::parseOptions()
|
|||||||
bool CommandHandler::executeBeforeContext()
|
bool CommandHandler::executeBeforeContext()
|
||||||
{
|
{
|
||||||
if (vm.count("help") || argc == 1) {
|
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";
|
<< " -- Next Generation Place and Route (Version " GIT_DESCRIBE_STR ")\n";
|
||||||
std::cerr << options << "\n";
|
std::cerr << options << "\n";
|
||||||
return argc != 1;
|
return argc != 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("version")) {
|
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";
|
<< " -- Next Generation Place and Route (Version " GIT_DESCRIBE_STR ")\n";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#include <boost/filesystem.hpp>
|
#include <filesystem>
|
||||||
#include <boost/iostreams/device/mapped_file.hpp>
|
#include <boost/iostreams/device/mapped_file.hpp>
|
||||||
#include "embed.h"
|
#include "embed.h"
|
||||||
#include "nextpnr.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;
|
static std::map<std::string, boost::iostreams::mapped_file> files;
|
||||||
if (!files.count(filename)) {
|
if (!files.count(filename)) {
|
||||||
std::string full_filename = EXTERNAL_CHIPDB_ROOT "/" + 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);
|
files[filename].open(full_filename, boost::iostreams::mapped_file::priv);
|
||||||
}
|
}
|
||||||
if (files.count(filename))
|
if (files.count(filename))
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
#include "pack.h"
|
#include "pack.h"
|
||||||
#include "validity_check.h"
|
#include "validity_check.h"
|
||||||
|
|
||||||
#include <boost/filesystem.hpp>
|
#include <filesystem>
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_BEGIN
|
NEXTPNR_NAMESPACE_BEGIN
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ struct FabulousImpl : ViaductAPI
|
|||||||
ViaductAPI::init(ctx);
|
ViaductAPI::init(ctx);
|
||||||
h.init(ctx);
|
h.init(ctx);
|
||||||
fab_root = get_env_var("FAB_ROOT", ", set it to the fabulous build output or project path");
|
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;
|
is_new_fab = true;
|
||||||
else
|
else
|
||||||
is_new_fab = false;
|
is_new_fab = false;
|
||||||
|
|||||||
@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "arch.h"
|
#include "arch.h"
|
||||||
#include <boost/filesystem/path.hpp>
|
|
||||||
#include "archdefs.h"
|
#include "archdefs.h"
|
||||||
#include "chipdb.h"
|
#include "chipdb.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
@ -31,6 +30,8 @@
|
|||||||
#include "router2.h"
|
#include "router2.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_BEGIN
|
NEXTPNR_NAMESPACE_BEGIN
|
||||||
|
|
||||||
static constexpr int database_version = 6;
|
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 = proc_share_dirname();
|
||||||
db_path += "himbaechel/";
|
db_path += "himbaechel/";
|
||||||
db_path += path;
|
db_path += path;
|
||||||
boost::filesystem::path p(db_path);
|
std::filesystem::path p(db_path);
|
||||||
db_path = p.make_preferred().string();
|
db_path = p.make_preferred().string();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user