File tree Expand file tree Collapse file tree 4 files changed +12
-7
lines changed
Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ FetchContent_Declare(
3333 GIT_TAG v1.12.0
3434)
3535FetchContent_MakeAvailable(spdlog)
36+ add_definitions (-DSPDLOG_USE_STD_FORMAT -DSPDLOG_USE_STD_FORMAT_HO)
3637
3738add_subdirectory (src)
3839
Original file line number Diff line number Diff line change 11add_library (core INTERFACE )
22target_include_directories (core INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} /core)
3- target_link_libraries (core INTERFACE spdlog::spdlog )
3+ target_link_libraries (core INTERFACE spdlog::spdlog_header_only )
44
55add_library (engine INTERFACE )
66target_include_directories (engine INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} /engine)
77
88add_executable (exchange_simulator sim/main.cpp)
9- target_link_libraries (exchange_simulator PRIVATE core engine)
9+ target_link_libraries (exchange_simulator PRIVATE core engine spdlog::spdlog_header_only)
10+ target_include_directories (exchange_simulator PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
Original file line number Diff line number Diff line change 55
66namespace es {
77
8- inline void info (std::string_view msg) {
9- spdlog::info (" {}" , msg);
10- }
8+ #define LOG_INFO (...) SPDLOG_INFO(__VA_ARGS__)
9+ #define LOG_WARN (...) SPDLOG_WARN(__VA_ARGS__)
10+ #define LOG_ERROR (...) SPDLOG_ERROR(__VA_ARGS__)
11+ #define LOG_DEBUG (...) SPDLOG_DEBUG(__VA_ARGS__)
12+ #define LOG_TRACE (...) SPDLOG_TRACE(__VA_ARGS__)
13+ #define LOG_CRITICAL (...) SPDLOG_CRITICAL(__VA_ARGS__)
1114
1215} // namespace es
Original file line number Diff line number Diff line change 1- #include " core/logger.h"
1+ #include < core/logger.h>
22
33int main () {
4- es::info (" ExchangeSimulator skeleton" );
4+ SPDLOG_INFO (" ExchangeSimulator skeleton" );
55 return 0 ;
66}
You can’t perform that action at this time.
0 commit comments