Little cmake and tests refactor

Change from spdlog_ex to const spdlog_ex& got rid of the GCC8 warning.
This commit is contained in:
Daniel Chabrowski
2018-08-14 21:33:47 +02:00
parent 4a871b9792
commit fb37585bc1
7 changed files with 21 additions and 26 deletions

View File

@@ -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)

View File

@@ -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;