mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-14 07:47:13 +00:00
IDatabaseUsage: MySQL/MariaDB from information_schema.TABLES (fresh statistics on MySQL 8), SQLite from its page counts and the dbstat table (now compiled in) with counted rows. Samples go to database_usage and database_usage_tables (migrations 105 / 88). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
750 B
CMake
23 lines
750 B
CMake
set (SQLITE3_SOURCES
|
|
"CppSQLite3.cpp"
|
|
"sqlite3.c"
|
|
)
|
|
|
|
add_library(sqlite3 ${SQLITE3_SOURCES})
|
|
|
|
if(UNIX)
|
|
# Add warning disable flags and link Unix libraries to sqlite3
|
|
target_link_libraries(sqlite3 pthread dl m)
|
|
|
|
# -Wno-unused-result -Wno-unknown-pragmas -fpermissive
|
|
target_compile_options(sqlite3 PRIVATE)
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
target_compile_options(sqlite3 PRIVATE "-Wno-return-local-addr" "-Wno-maybe-uninitialized")
|
|
else()
|
|
target_compile_options(sqlite3 PRIVATE "-Wno-return-stack-address" "-Wno-uninitialized" "-Wno-deprecated-declarations")
|
|
endif()
|
|
endif()
|
|
|
|
# The dashboard measures each table's bytes (Database usage) with the dbstat table
|
|
target_compile_definitions(sqlite3 PRIVATE SQLITE_ENABLE_DBSTAT_VTAB)
|