updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
2025-07-26 08:52:20 -05:00
parent 14d0173bd3
commit f11f92ba55

View File

@@ -50,8 +50,17 @@
#endif // defined(PROJECT_ENABLE_CURL) #endif // defined(PROJECT_ENABLE_CURL)
namespace { namespace {
#if defined(PROJECT_ENABLE_CURL)
bool curl_initialized{false}; bool curl_initialized{false};
#endif // defined(PROJECT_ENABLE_CURL)
#if defined(PROJECT_ENABLE_SPDLOG)
bool spdlog_initialized{false};
#endif // defined(PROJECT_ENABLE_SPDLOG)
#if defined(PROJECT_ENABLE_SQLITE)
bool sqlite3_initialized{false}; bool sqlite3_initialized{false};
#endif // defined(PROJECT_ENABLE_SQLITE)
} // namespace } // namespace
namespace repertory { namespace repertory {
@@ -72,9 +81,12 @@ auto project_initialize() -> bool {
} }
#endif // defined(PROJECT_REQUIRE_ALPINE) && !defined (PROJECT_IS_MINGW) #endif // defined(PROJECT_REQUIRE_ALPINE) && !defined (PROJECT_IS_MINGW)
#if defined(PROJECT_ENABLE_SPDLOG)
spdlog::drop_all(); spdlog::drop_all();
spdlog::flush_every(std::chrono::seconds(5)); spdlog::flush_every(std::chrono::seconds(5));
spdlog::set_pattern("%Y-%m-%d|%T.%e|%^%l%$|%v"); spdlog::set_pattern("%Y-%m-%d|%T.%e|%^%l%$|%v");
spdlog_initialized = true;
#endif // defined(PROJECT_ENABLE_SPDLOG)
#if defined(PROJECT_ENABLE_LIBSODIUM) #if defined(PROJECT_ENABLE_LIBSODIUM)
if (sodium_init() == -1) { if (sodium_init() == -1) {
@@ -116,15 +128,22 @@ void project_cleanup() {
#if defined(PROJECT_ENABLE_CURL) #if defined(PROJECT_ENABLE_CURL)
if (curl_initialized) { if (curl_initialized) {
curl_shared::cleanup(); curl_shared::cleanup();
curl_initialized = false;
} }
#endif // defined(PROJECT_ENABLE_CURL) #endif // defined(PROJECT_ENABLE_CURL)
#if defined(PROJECT_ENABLE_SQLITE) #if defined(PROJECT_ENABLE_SQLITE)
if (sqlite3_initialized) { if (sqlite3_initialized) {
sqlite3_shutdown(); sqlite3_shutdown();
sqlite3_initialized = false;
} }
#endif // defined(PROJECT_ENABLE_SQLITE) #endif // defined(PROJECT_ENABLE_SQLITE)
#if defined(PROJECT_ENABLE_SPDLOG)
if (spdlog_initialized) {
spdlog::shutdown(); spdlog::shutdown();
spdlog_initialized = false;
}
#endif // defined(PROJECT_ENABLE_SPDLOG)
} }
} // namespace repertory } // namespace repertory