Compare commits

..

No commits in common. "e991337beea6b03d41c775fb47e967333660ace6" and "0ba945ea5377753ff3abcf760fa58893b1e74318" have entirely different histories.

4 changed files with 6 additions and 10 deletions

View File

@ -5,13 +5,8 @@ option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
option(ENABLE_UBSAN "Enable the ub sanitizer" OFF)
option(ENABLE_TSAN "Enable the thread data race sanitizer" OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 17)
#set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
#set(BUILD_SHARED_LIBS OFF)
#set(POSITION_INDEPENDENT_CODE ON)
add_compile_options(-march=native)
set(SQLITE_ORM_ENABLE_CXX_17 ON)
@ -19,6 +14,7 @@ set(SQLITE_ORM_ENABLE_CXX_17 ON)
add_subdirectory(libs/blt)
add_subdirectory(libs/DPP-10.0.29)
add_subdirectory(libs/sqlite_orm-1.8.2)
add_subdirectory(libs/SQLiteCpp-3.3.1)
find_package(CURL)
@ -30,10 +26,11 @@ add_executable(discord_bot ${PROJECT_BUILD_FILES})
target_compile_options(discord_bot PUBLIC -Wall -Wpedantic -Wno-comment -march=native)
target_link_options(discord_bot PUBLIC -Wall -Wpedantic -Wno-comment)
target_link_libraries(discord_bot PUBLIC curl)
target_link_libraries(discord_bot PUBLIC BLT)
target_link_libraries(discord_bot PUBLIC dpp)
target_link_libraries(discord_bot PUBLIC sqlite_orm)
target_link_libraries(discord_bot PUBLIC BLT)
target_link_libraries(discord_bot PUBLIC curl)
target_link_libraries(discord_bot PUBLIC SQLiteCpp sqlite3 pthread dl)
if (${ENABLE_ADDRSAN} MATCHES ON)
target_compile_options(discord_bot PRIVATE -fsanitize=address)

View File

@ -145,7 +145,6 @@ namespace db
auto make_message_table()
{
using namespace sqlite_orm;
return make_table("messages",
make_column("messageID", &message_t::messageID, primary_key()),
make_column("channelID", &message_t::channelID),

@ -1 +1 @@
Subproject commit 9ad652195b0a69f9977d313eff4dd01a7890f1df
Subproject commit 9b4d0cc9a8493c608ab0075ab2c6a2b66061f3be

View File

@ -27,7 +27,7 @@ struct db_obj
std::queue<blt::u64> user_load_queue;
std::mutex user_load_queue_mutex;
database_type db;
std::thread* thread = nullptr;
std::thread* thread;
public:
explicit db_obj(blt::u64 guildID, const std::string& path): guildID(guildID), db(make_database(path + "/" + std::to_string(guildID) + "/"))