Compare commits
3 Commits
0ba945ea53
...
e991337bee
Author | SHA1 | Date |
---|---|---|
Brett | e991337bee | |
Brett | 853c58a853 | |
Brett | 069444a1e0 |
|
@ -5,8 +5,13 @@ 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)
|
||||
|
@ -14,7 +19,6 @@ 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)
|
||||
|
||||
|
@ -26,11 +30,10 @@ 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 BLT)
|
||||
target_link_libraries(discord_bot PUBLIC curl)
|
||||
target_link_libraries(discord_bot PUBLIC dpp)
|
||||
target_link_libraries(discord_bot PUBLIC sqlite_orm)
|
||||
target_link_libraries(discord_bot PUBLIC curl)
|
||||
target_link_libraries(discord_bot PUBLIC SQLiteCpp sqlite3 pthread dl)
|
||||
target_link_libraries(discord_bot PUBLIC BLT)
|
||||
|
||||
if (${ENABLE_ADDRSAN} MATCHES ON)
|
||||
target_compile_options(discord_bot PRIVATE -fsanitize=address)
|
||||
|
|
|
@ -145,6 +145,7 @@ 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),
|
||||
|
|
2
libs/blt
2
libs/blt
|
@ -1 +1 @@
|
|||
Subproject commit 9b4d0cc9a8493c608ab0075ab2c6a2b66061f3be
|
||||
Subproject commit 9ad652195b0a69f9977d313eff4dd01a7890f1df
|
|
@ -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;
|
||||
std::thread* thread = nullptr;
|
||||
|
||||
public:
|
||||
explicit db_obj(blt::u64 guildID, const std::string& path): guildID(guildID), db(make_database(path + "/" + std::to_string(guildID) + "/"))
|
||||
|
|
Loading…
Reference in New Issue