diff options
author | Daniel Chabrowski <dantezstudio@gmail.com> | 2018-08-14 22:33:47 +0300 |
---|---|---|
committer | Daniel Chabrowski <dantezstudio@gmail.com> | 2018-08-14 22:33:47 +0300 |
commit | fb37585bc189b6e5af2a63a1e7c4b6b106a17720 (patch) | |
tree | a5236fcf826518e4d3e6e6a58297551d28b6c1bf /example | |
parent | 4a871b97921c868b9dff6fe3bf15090689b666cf (diff) |
Little cmake and tests refactor
Change from spdlog_ex to const spdlog_ex& got rid of the GCC8 warning.
Diffstat (limited to 'example')
-rw-r--r-- | example/CMakeLists.txt | 3 | ||||
-rw-r--r-- | example/multisink.cpp | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 69eb374e..695053cd 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -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) diff --git a/example/multisink.cpp b/example/multisink.cpp index fefa3b39..7dc267d2 100644 --- a/example/multisink.cpp +++ b/example/multisink.cpp @@ -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; |