From 13a9fcd10bbbba3851b4d32eaada3e337dcbabbf Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 27 Aug 2018 11:02:54 +0200 Subject: [PATCH] add fmtlib as submodule --- common/.gitmodules | 3 +++ common/CMakeLists.txt | 1 + common/include/villas/log.hpp | 1 + common/lib/CMakeLists.txt | 1 + common/thirdparty/fmtlib | 1 + 5 files changed, 7 insertions(+) create mode 160000 common/thirdparty/fmtlib diff --git a/common/.gitmodules b/common/.gitmodules index 363485649..c3a60a9cd 100644 --- a/common/.gitmodules +++ b/common/.gitmodules @@ -1,3 +1,6 @@ [submodule "thirdparty/spdlog"] path = thirdparty/spdlog url = https://github.com/gabime/spdlog.git +[submodule "thirdparty/fmtlib"] + path = thirdparty/fmtlib + url = https://github.com/fmtlib/fmt.git diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 9b0f054ee..d95a8a3ce 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -61,6 +61,7 @@ set(SPDLOG_BUILD_EXAMPLES OFF) set(SPDLOG_BUILD_TESTING OFF) set(SPDLOG_BUILD_BENCH OFF) add_subdirectory(thirdparty/spdlog) +add_subdirectory(thirdparty/fmtlib) pkg_check_modules(JANSSON IMPORTED_TARGET REQUIRED jansson>=2.7) pkg_check_modules(LIBCONFIG IMPORTED_TARGET libconfig>=1.4.9) diff --git a/common/include/villas/log.hpp b/common/include/villas/log.hpp index 6f06cd6e4..dffb22e24 100644 --- a/common/include/villas/log.hpp +++ b/common/include/villas/log.hpp @@ -27,6 +27,7 @@ #define SPDLOG_LEVEL_NAMES { "trace", "debug", "info ", "warn ", "error", "crit ", "off " } #define SPDLOG_NAME_WIDTH 17 +#define SPDLOG_FMT_EXTERNAL #include #include diff --git a/common/lib/CMakeLists.txt b/common/lib/CMakeLists.txt index 5a23fdc49..43847336f 100644 --- a/common/lib/CMakeLists.txt +++ b/common/lib/CMakeLists.txt @@ -67,6 +67,7 @@ target_link_libraries(villas-common PUBLIC ${CURL_LIBRARIES} ${CMAKE_DL_LIBS} spdlog + fmt ) target_compile_definitions(villas-common PUBLIC diff --git a/common/thirdparty/fmtlib b/common/thirdparty/fmtlib new file mode 160000 index 000000000..c2ce7e4f0 --- /dev/null +++ b/common/thirdparty/fmtlib @@ -0,0 +1 @@ +Subproject commit c2ce7e4f07f7b34b2c7bbd0a4d0798b1d7007f4f