updated build system
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				BlockStorage/repertory/pipeline/head This commit looks good
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	BlockStorage/repertory/pipeline/head This commit looks good
				
			This commit is contained in:
		| @@ -50,8 +50,17 @@ | ||||
| #endif // defined(PROJECT_ENABLE_CURL) | ||||
|  | ||||
| namespace { | ||||
| #if defined(PROJECT_ENABLE_CURL) | ||||
| 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}; | ||||
| #endif // defined(PROJECT_ENABLE_SQLITE) | ||||
| } // namespace | ||||
|  | ||||
| namespace repertory { | ||||
| @@ -72,9 +81,12 @@ auto project_initialize() -> bool { | ||||
|   } | ||||
| #endif // defined(PROJECT_REQUIRE_ALPINE) && !defined (PROJECT_IS_MINGW) | ||||
|  | ||||
| #if defined(PROJECT_ENABLE_SPDLOG) | ||||
|   spdlog::drop_all(); | ||||
|   spdlog::flush_every(std::chrono::seconds(5)); | ||||
|   spdlog::set_pattern("%Y-%m-%d|%T.%e|%^%l%$|%v"); | ||||
|   spdlog_initialized = true; | ||||
| #endif // defined(PROJECT_ENABLE_SPDLOG) | ||||
|  | ||||
| #if defined(PROJECT_ENABLE_LIBSODIUM) | ||||
|   if (sodium_init() == -1) { | ||||
| @@ -116,15 +128,22 @@ void project_cleanup() { | ||||
| #if defined(PROJECT_ENABLE_CURL) | ||||
|   if (curl_initialized) { | ||||
|     curl_shared::cleanup(); | ||||
|     curl_initialized = false; | ||||
|   } | ||||
| #endif // defined(PROJECT_ENABLE_CURL) | ||||
|  | ||||
| #if defined(PROJECT_ENABLE_SQLITE) | ||||
|   if (sqlite3_initialized) { | ||||
|     sqlite3_shutdown(); | ||||
|     sqlite3_initialized = false; | ||||
|   } | ||||
| #endif // defined(PROJECT_ENABLE_SQLITE) | ||||
|  | ||||
|   spdlog::shutdown(); | ||||
| #if defined(PROJECT_ENABLE_SPDLOG) | ||||
|   if (spdlog_initialized) { | ||||
|     spdlog::shutdown(); | ||||
|     spdlog_initialized = false; | ||||
|   } | ||||
| #endif // defined(PROJECT_ENABLE_SPDLOG) | ||||
| } | ||||
| } // namespace repertory | ||||
|   | ||||
		Reference in New Issue
	
	Block a user