mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 09:09:35 +08:00
Little cmake and tests refactor
Change from spdlog_ex to const spdlog_ex& got rid of the GCC8 warning.
This commit is contained in:
@@ -37,6 +37,7 @@ target_link_libraries(example spdlog::spdlog Threads::Threads)
|
||||
add_executable(multisink multisink.cpp)
|
||||
target_link_libraries(multisink spdlog::spdlog Threads::Threads)
|
||||
|
||||
enable_testing()
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
||||
|
||||
enable_testing()
|
||||
add_test(NAME example COMMAND example)
|
||||
|
@@ -4,7 +4,6 @@
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
namespace spd = spdlog;
|
||||
int main(int, char *[])
|
||||
{
|
||||
bool enable_debug = true;
|
||||
@@ -39,7 +38,7 @@ int main(int, char *[])
|
||||
spdlog::drop_all();
|
||||
}
|
||||
// Exceptions will only be thrown upon failed logger or sink construction (not during logging)
|
||||
catch (const spd::spdlog_ex &ex)
|
||||
catch (const spdlog::spdlog_ex &ex)
|
||||
{
|
||||
std::cout << "Log init failed: " << ex.what() << std::endl;
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user