From 822aee2b4f22c2afcb9ea3fddb87b70a9f603991 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Sun, 30 Jun 2019 16:27:28 +0200 Subject: [PATCH 01/23] Added meson build support --- .gitignore | 3 ++ bench/meson.build | 13 ++++++ meson.build | 105 ++++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 4 ++ tests/meson.build | 43 +++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 bench/meson.build create mode 100644 meson.build create mode 100644 meson_options.txt create mode 100644 tests/meson.build diff --git a/.gitignore b/.gitignore index fafa874a..f3444852 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,9 @@ build/* # Codelite .codelite +# KDevelop +*.kdev4 + # .orig files *.orig diff --git a/bench/meson.build b/bench/meson.build new file mode 100644 index 00000000..e185e689 --- /dev/null +++ b/bench/meson.build @@ -0,0 +1,13 @@ +benchmark = dependency('benchmark') + +bench_matrix = [ + ['bench', [spdlog_dep], []], + ['async_bench', [spdlog_dep], []], + ['formatter-bench', [spdlog_dep, benchmark], ['all']], + ['latency', [spdlog_dep, benchmark], []], +] + +foreach i : bench_matrix + bench_exe = executable(i[0], i[0] + '.cpp', dependencies: i[1]) + benchmark('bench_' + i[0], bench_exe, args: i[2]) +endforeach diff --git a/meson.build b/meson.build new file mode 100644 index 00000000..552d0cda --- /dev/null +++ b/meson.build @@ -0,0 +1,105 @@ +project('spdlog', ['cpp'], + license : 'MIT', + version : '1.3.1', + default_options : ['warning_level=3', 'cpp_std=c++11', 'default_library=static'], +) + +# ------------------------ +# --- Dependencies --- +# ------------------------ + +dep_list = [] +compile_args = [] + +# Threads +dep_list += dependency('threads') + +# Check for FMT +if get_option('extrenal_fmt') + if not meson.version().version_compare('>=0.49.0') + warning('Finding fmt can fail wit meson versions before 0.49.0') + endif + dep_list += dependency('fmt') + compile_args += '-DSPDLOG_FMT_EXTERNAL' +endif + +# ------------------------------------ +# --- Compiled library version --- +# ------------------------------------ + +spdlog_inc = include_directories('./include') + +spdlog = library('spdlog', ['src/spdlog.cpp'], + cpp_args : [compile_args] + ['-DSPDLOG_COMPILED_LIB'], + include_directories : spdlog_inc, + dependencies : dep_list, + install : true, +) + +spdlog_dep = declare_dependency( + link_with : spdlog, + include_directories : spdlog_inc, + compile_args : compile_args + ['-DSPDLOG_COMPILED_LIB'], + dependencies : dep_list, + version : meson.project_version(), +) + +# ---------------------------------- +# --- Header only dependency --- +# ---------------------------------- + +spdlog_headeronly_dep = declare_dependency( + include_directories : spdlog_inc, + compile_args : compile_args, + dependencies : dep_list, + version : meson.project_version(), +) + +# ------------------------ +# --- Installation --- +# ------------------------ + +install_subdir('include/spdlog', install_dir: get_option('includedir')) + +pkg = import('pkgconfig') +pkg.generate(spdlog, + name : 'spdlog', + description : 'Fast C++ logging library', + url : 'https://github.com/gabime/spdlog', + extra_cflags : ['-DSPDLOG_COMPILED_LIB'] +) + +# ------------------------------------- +# --- Conditionally add subdirs --- +# ------------------------------------- + +if get_option('enable_tests') + subdir('tests') +endif + +if get_option('enable_examples') + subdir('example') +endif + +if get_option('enable_benchmarks') + subdir('bench') +endif + +# ------------------- +# --- Summary --- +# ------------------- + +summary_str = '''spdlog build summary: + + - using extrenal fmt: @0@ + - building tests: @1@ + - building examples: @2@ + - building benchmarks: @3@ +'''.format( + get_option('extrenal_fmt'), + get_option('enable_tests'), + get_option('enable_examples'), + get_option('enable_benchmarks') +) + +message(summary_str) diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 00000000..7dafbf51 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,4 @@ +option('extrenal_fmt', type: 'boolean', value: false) +option('enable_examples', type: 'boolean', value: false) +option('enable_benchmarks', type: 'boolean', value: false) +option('enable_tests', type: 'boolean', value: false) diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 00000000..9cb7eef4 --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,43 @@ +test_sources = files([ + 'main.cpp', + 'test_async.cpp', + 'test_dup_filter.cpp', + 'test_errors.cpp', + 'test_file_helper.cpp', + 'test_file_logging.cpp', + 'test_fmt_helper.cpp', + 'test_macros.cpp', + 'test_misc.cpp', + 'test_mpmc_q.cpp', + 'test_pattern_formatter.cpp', + 'test_registry.cpp', + 'test_stdout_api.cpp', + 'utils.cpp', +]) + +global_test_deps = [] + +# ----------------------------------------------------- +# --- Add the systemd test if libsystemd is found --- +# ----------------------------------------------------- + +systemd_dep = dependency('libsystemd', required: false) + +if systemd_dep.found() + test_sources += files(['test_systemd.cpp']) + global_test_deps += systemd_dep +endif + +# -------------------------------------- +# --- Build the test executables --- +# -------------------------------------- + +test_matrix = [ + ['spdlog-utest', spdlog_dep], + ['spdlog-utest-ho', spdlog_headeronly_dep], +] + +foreach i : test_matrix + test_exe = executable(i[0], test_sources, dependencies: global_test_deps + [i[1]]) + test('test_' + i[0], test_exe) +endforeach From af4026104c56a1933f2b3102724d87187c2c47e0 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Sun, 30 Jun 2019 16:48:20 +0200 Subject: [PATCH 02/23] Extract version from header file --- extract_version.py | 17 +++++++++++++++++ meson.build | 10 ++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100755 extract_version.py diff --git a/extract_version.py b/extract_version.py new file mode 100755 index 00000000..a6f791e9 --- /dev/null +++ b/extract_version.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 + +import os +import re + +base_path = os.path.abspath(os.path.dirname(__file__)) +config_h = os.path.join(base_path, 'include', 'spdlog', 'version.h') +data = {'MAJOR': 0, 'MINOR': 0, 'PATCH': 0} +reg = re.compile(r'^\s*#define\s+SPDLOG_VER_([A-Z]+)\s+([0-9]+).*$') + +with open(config_h, 'r') as fp: + for l in fp: + m = reg.match(l) + if m: + data[m.group(1)] = int(m.group(2)) + +print('{}.{}.{}'.format(data['MAJOR'], data['MINOR'], data['PATCH'])) diff --git a/meson.build b/meson.build index 552d0cda..899ba1f4 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,13 @@ project('spdlog', ['cpp'], license : 'MIT', - version : '1.3.1', - default_options : ['warning_level=3', 'cpp_std=c++11', 'default_library=static'], + version : run_command(find_program('extract_version.py')).stdout().strip(), + default_options : [ + 'warning_level=3', + 'cpp_std=c++11', + 'default_library=static', + 'buildtype=release', + 'b_colorout=always', + ], ) # ------------------------ From 3bcd3cef2f4a7bfd2faab88f9871560f1e73f690 Mon Sep 17 00:00:00 2001 From: Charles Milette Date: Sun, 30 Jun 2019 19:00:28 -0400 Subject: [PATCH 03/23] Fix deprecation warnings in filename_to_str --- include/spdlog/common.h | 17 ++++-------- include/spdlog/details/os-inl.h | 47 +++++++++++++++++++++------------ include/spdlog/details/os.h | 6 ++--- include/spdlog/logger.h | 6 ++--- 4 files changed, 41 insertions(+), 35 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index ae9f0fa4..2f23e9e4 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -26,11 +26,6 @@ #include #endif //_WIN32 -#if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) -#include -#include -#endif - #ifdef SPDLOG_COMPILED_LIB #undef SPDLOG_HEADER_ONLY #define SPDLOG_INLINE @@ -80,11 +75,6 @@ class sink; #if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) using filename_t = std::wstring; #define SPDLOG_FILENAME_T(s) L##s -inline std::string filename_to_str(const filename_t &filename) -{ - std::wstring_convert, wchar_t> c; - return c.to_bytes(filename); -} #else using filename_t = std::string; #define SPDLOG_FILENAME_T(s) s @@ -97,10 +87,13 @@ using err_handler = std::function; // string_view type - either std::string_view or fmt::string_view (pre c++17) #if defined(FMT_USE_STD_STRING_VIEW) -using string_view_t = std::string_view; +template +using basic_string_view_t = std::basic_string_view; #else -using string_view_t = fmt::string_view; +template +using basic_string_view_t = fmt::basic_string_view; #endif +using string_view_t = basic_string_view_t; #if defined(SPDLOG_NO_ATOMIC_LEVELS) using level_t = details::null_atomic_int; diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index e0809d9b..dd4fc8f9 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -36,6 +36,10 @@ #include #endif +#if defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES) +#include +#endif + #else // unix #include @@ -342,13 +346,12 @@ SPDLOG_INLINE void sleep_for_millis(int milliseconds) SPDLOG_NOEXCEPT // wchar support for windows file names (SPDLOG_WCHAR_FILENAMES must be defined) #if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) -SPDLOG_INLINE std::string filename_to_str(const filename_t &filename) SPDLOG_NOEXCEPT +SPDLOG_INLINE std::string filename_to_str(const filename_t &filename) { - std::wstring_convert, wchar_t> c; - return c.to_bytes(filename); + return wstr_to_str(filename); } #else -SPDLOG_INLINE std::string filename_to_str(const filename_t &filename) SPDLOG_NOEXCEPT +SPDLOG_INLINE std::string filename_to_str(const filename_t &filename) { return filename; } @@ -398,28 +401,38 @@ SPDLOG_INLINE bool in_terminal(FILE *file) SPDLOG_NOEXCEPT #endif } -#if defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) && defined(_WIN32) -SPDLOG_INLINE void wbuf_to_utf8buf(const fmt::wmemory_buffer &wbuf, fmt::memory_buffer &target) +#if (defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES)) && defined(_WIN32) +SPDLOG_INLINE std::string wstr_to_str(basic_string_view_t wstr) { - int wbuf_size = static_cast(wbuf.size()); - if (wbuf_size == 0) + if (wstr.size() > static_cast(std::numeric_limits::max())) { - return; + throw spdlog::spdlog_ex("UTF-16 string is too big to be converted to UTF-8"); } - auto result_size = ::WideCharToMultiByte(CP_UTF8, 0, wbuf.data(), wbuf_size, NULL, 0, NULL, NULL); + int wstr_size = static_cast(wstr.size()); + if (wstr_size == 0) + { + return { }; + } + + int result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, NULL, 0, NULL, NULL); if (result_size > 0) { - target.resize(result_size); - ::WideCharToMultiByte(CP_UTF8, 0, wbuf.data(), wbuf_size, &target.data()[0], result_size, NULL, NULL); - } - else - { - throw spdlog::spdlog_ex(fmt::format("WideCharToMultiByte failed. Last error: {}", ::GetLastError())); + std::string result; + result.resize(result_size); + result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, &result[0], result_size, NULL, NULL); + + if (result_size > 0) + { + result.resize(result_size); + return result; + } } + + throw spdlog::spdlog_ex(fmt::format("WideCharToMultiByte failed. Last error: {}", ::GetLastError())); } -#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT) && _WIN32 +#endif // (defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES)) && defined(_WIN32) } // namespace os } // namespace details diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index 4afe0cb9..30c569c5 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -68,7 +68,7 @@ size_t thread_id() SPDLOG_NOEXCEPT; // See https://github.com/gabime/spdlog/issues/609 void sleep_for_millis(int milliseconds) SPDLOG_NOEXCEPT; -std::string filename_to_str(const filename_t &filename) SPDLOG_NOEXCEPT; +std::string filename_to_str(const filename_t &filename); int pid() SPDLOG_NOEXCEPT; @@ -80,8 +80,8 @@ bool is_color_terminal() SPDLOG_NOEXCEPT; // Source: https://github.com/agauniyal/rang/ bool in_terminal(FILE *file) SPDLOG_NOEXCEPT; -#if defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) && defined(_WIN32) -void wbuf_to_utf8buf(const fmt::wmemory_buffer &wbuf, fmt::memory_buffer &target); +#if (defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES)) && defined(_WIN32) +std::string wstr_to_str(basic_string_view_t wstr); #endif } // namespace os diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index bc627c4b..59cb5db6 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -243,9 +243,9 @@ public: // format to wmemory_buffer and convert to utf8 fmt::wmemory_buffer wbuf; fmt::format_to(wbuf, fmt, args...); - fmt::memory_buffer buf; - details::os::wbuf_to_utf8buf(wbuf, buf); - details::log_msg log_msg(source, name_, lvl, string_view_t(buf.data(), buf.size())); + + const auto payload = details::os::wstr_to_str({ wbuf.data(), wbuf.size() }); + details::log_msg log_msg(source, name_, lvl, payload); sink_it_(log_msg); } catch (const std::exception &ex) From 5a4deb6e88d6ed89a32dc2d4e4acca7aeefbe104 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Mon, 1 Jul 2019 03:14:08 +0300 Subject: [PATCH 04/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e59e2ed..ba06160a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Very fast, header-only/compiled, C++ logging library. [![Build Status](https://t #### Static lib version (recommended - much faster compile times, v1.4.0) * Copy [src/spdlog.cpp](https://github.com/gabime/spdlog/blob/v1.x/src/spdlog.cpp) to your build tree and pass the `-DSPDLOG_COMPILED_LIB` to the compiler. -* Or use CMake to build and use. See [example](https://github.com/gabime/spdlog/blob/v1.x/example/CMakeLists.txt). +* Or use **CMake** to build and use. See [example](https://github.com/gabime/spdlog/blob/v1.x/example/CMakeLists.txt). ## Platforms From f529afa625c4a9bf4111620a788517cc9652000c Mon Sep 17 00:00:00 2001 From: Charles Milette Date: Sun, 30 Jun 2019 21:34:19 -0400 Subject: [PATCH 05/23] Use stack allocated space when possible --- include/spdlog/details/os-inl.h | 24 +++++++++++++++--------- include/spdlog/details/os.h | 2 +- include/spdlog/logger.h | 6 ++++-- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index dd4fc8f9..3c2fc9e9 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -348,7 +348,9 @@ SPDLOG_INLINE void sleep_for_millis(int milliseconds) SPDLOG_NOEXCEPT #if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) SPDLOG_INLINE std::string filename_to_str(const filename_t &filename) { - return wstr_to_str(filename); + fmt::memory_buffer buf; + wstr_to_utf8buf(filename, buf); + return fmt::to_string(buf); } #else SPDLOG_INLINE std::string filename_to_str(const filename_t &filename) @@ -402,7 +404,7 @@ SPDLOG_INLINE bool in_terminal(FILE *file) SPDLOG_NOEXCEPT } #if (defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES)) && defined(_WIN32) -SPDLOG_INLINE std::string wstr_to_str(basic_string_view_t wstr) +SPDLOG_INLINE void wstr_to_utf8buf(basic_string_view_t wstr, fmt::memory_buffer &target) { if (wstr.size() > static_cast(std::numeric_limits::max())) { @@ -412,21 +414,25 @@ SPDLOG_INLINE std::string wstr_to_str(basic_string_view_t wstr) int wstr_size = static_cast(wstr.size()); if (wstr_size == 0) { - return { }; + target.resize(0); + return; } - int result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, NULL, 0, NULL, NULL); + int result_size = target.capacity(); + if ((wstr_size + 1) * 2 > result_size) + { + result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, NULL, 0, NULL, NULL); + } if (result_size > 0) { - std::string result; - result.resize(result_size); - result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, &result[0], result_size, NULL, NULL); + target.resize(result_size); + result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, target.data(), result_size, NULL, NULL); if (result_size > 0) { - result.resize(result_size); - return result; + target.resize(result_size); + return; } } diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index 30c569c5..27694494 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -81,7 +81,7 @@ bool is_color_terminal() SPDLOG_NOEXCEPT; bool in_terminal(FILE *file) SPDLOG_NOEXCEPT; #if (defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES)) && defined(_WIN32) -std::string wstr_to_str(basic_string_view_t wstr); +void wstr_to_utf8buf(basic_string_view_t wstr, fmt::memory_buffer &target); #endif } // namespace os diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 59cb5db6..1d831362 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -244,8 +244,10 @@ public: fmt::wmemory_buffer wbuf; fmt::format_to(wbuf, fmt, args...); - const auto payload = details::os::wstr_to_str({ wbuf.data(), wbuf.size() }); - details::log_msg log_msg(source, name_, lvl, payload); + fmt::memory_buffer buf; + details::os::wstr_to_utf8buf(basic_string_view_t(wbuf.data(), wbuf.size()), buf); + + details::log_msg log_msg(source, name_, lvl, string_view_t(buf.data(), buf.size())); sink_it_(log_msg); } catch (const std::exception &ex) From 9e602a491b71ddb00cd76ba6f7a2c5c66661d72e Mon Sep 17 00:00:00 2001 From: Charles Milette Date: Sun, 30 Jun 2019 21:43:28 -0400 Subject: [PATCH 06/23] Silence narrowing warning --- include/spdlog/details/os-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index 3c2fc9e9..0675436b 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -418,7 +418,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(basic_string_view_t wstr, fmt::memor return; } - int result_size = target.capacity(); + int result_size = static_cast(target.capacity()); if ((wstr_size + 1) * 2 > result_size) { result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, NULL, 0, NULL, NULL); From 7ffa0766b45209be73890bf3272bc8feb9798381 Mon Sep 17 00:00:00 2001 From: Shintaro Seki Date: Mon, 1 Jul 2019 15:57:48 +0900 Subject: [PATCH 07/23] Fix rotation condition when SPDLOG_NO_DATETIME is defined. When SPDLOG_NO_DATETIME is defined, the rotation was never worked because `msg.time` is always zero. --- include/spdlog/sinks/daily_file_sink.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/spdlog/sinks/daily_file_sink.h b/include/spdlog/sinks/daily_file_sink.h index 687da043..91809e90 100644 --- a/include/spdlog/sinks/daily_file_sink.h +++ b/include/spdlog/sinks/daily_file_sink.h @@ -67,8 +67,11 @@ public: protected: void sink_it_(const details::log_msg &msg) override { - +#ifdef SPDLOG_NO_DATETIME + if (log_clock::now() >= rotation_tp_) +#else if (msg.time >= rotation_tp_) +#endif { file_helper_.open(FileNameCalc::calc_filename(base_filename_, now_tm(msg.time)), truncate_); rotation_tp_ = next_rotation_tp_(); From 54e44ab477802f3e5cc24226ba7fc7307e3265c0 Mon Sep 17 00:00:00 2001 From: Shintaro Seki Date: Mon, 1 Jul 2019 19:00:30 +0900 Subject: [PATCH 08/23] Fix one more `msg.time`. --- include/spdlog/sinks/daily_file_sink.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/spdlog/sinks/daily_file_sink.h b/include/spdlog/sinks/daily_file_sink.h index 91809e90..a0798bee 100644 --- a/include/spdlog/sinks/daily_file_sink.h +++ b/include/spdlog/sinks/daily_file_sink.h @@ -68,12 +68,13 @@ protected: void sink_it_(const details::log_msg &msg) override { #ifdef SPDLOG_NO_DATETIME - if (log_clock::now() >= rotation_tp_) + auto time = log_clock::now(); #else - if (msg.time >= rotation_tp_) + auto time = msg.time; #endif + if (time >= rotation_tp_) { - file_helper_.open(FileNameCalc::calc_filename(base_filename_, now_tm(msg.time)), truncate_); + file_helper_.open(FileNameCalc::calc_filename(base_filename_, now_tm(time)), truncate_); rotation_tp_ = next_rotation_tp_(); } fmt::memory_buffer formatted; From 452770e374c3ab77b89d877ab4fd4e98064f0e3e Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Mon, 1 Jul 2019 13:19:03 +0300 Subject: [PATCH 09/23] Delete CPackConfig.cmake --- cygwin/CPackConfig.cmake | 82 ---------------------------------------- 1 file changed, 82 deletions(-) delete mode 100644 cygwin/CPackConfig.cmake diff --git a/cygwin/CPackConfig.cmake b/cygwin/CPackConfig.cmake deleted file mode 100644 index 13833133..00000000 --- a/cygwin/CPackConfig.cmake +++ /dev/null @@ -1,82 +0,0 @@ -# This file will be configured to contain variables for CPack. These variables -# should be set in the CMake list file of the project before CPack module is -# included. The list of available CPACK_xxx variables and their associated -# documentation may be obtained using -# cpack --help-variable-list -# -# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME) -# and some are specific to a generator -# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables -# usually begin with CPACK__xxxx. - - -SET(CPACK_BINARY_7Z "") -SET(CPACK_BINARY_BUNDLE "") -SET(CPACK_BINARY_CYGWIN "") -SET(CPACK_BINARY_DEB "") -SET(CPACK_BINARY_DRAGNDROP "") -SET(CPACK_BINARY_IFW "") -SET(CPACK_BINARY_NSIS "") -SET(CPACK_BINARY_OSXX11 "") -SET(CPACK_BINARY_PACKAGEMAKER "") -SET(CPACK_BINARY_RPM "") -SET(CPACK_BINARY_STGZ "") -SET(CPACK_BINARY_TBZ2 "") -SET(CPACK_BINARY_TGZ "") -SET(CPACK_BINARY_TXZ "") -SET(CPACK_BINARY_TZ "") -SET(CPACK_BINARY_WIX "") -SET(CPACK_BINARY_ZIP "") -SET(CPACK_CMAKE_GENERATOR "Unix Makefiles") -SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE") -SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE") -SET(CPACK_GENERATOR "TGZ;ZIP") -SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "0") -SET(CPACK_INSTALL_CMAKE_PROJECTS "/cygdrive/e/devel/spdlog/cygwin;spdlog;ALL;.") -SET(CPACK_INSTALL_PREFIX "/usr/local") -SET(CPACK_MODULE_PATH "") -SET(CPACK_NSIS_DISPLAY_NAME "spdlog 1.4.0") -SET(CPACK_NSIS_INSTALLER_ICON_CODE "") -SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") -SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") -SET(CPACK_NSIS_PACKAGE_NAME "spdlog 1.4.0") -SET(CPACK_OUTPUT_CONFIG_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackConfig.cmake") -SET(CPACK_PACKAGE_CONTACT "Gabi Melman ") -SET(CPACK_PACKAGE_DEFAULT_LOCATION "/") -SET(CPACK_PACKAGE_DESCRIPTION_FILE "/usr/share/cmake-3.6.2/Templates/CPack.GenericDescription.txt") -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "spdlog built using CMake") -SET(CPACK_PACKAGE_FILE_NAME "spdlog-1.4.0-CYGWIN") -SET(CPACK_PACKAGE_INSTALL_DIRECTORY "spdlog 1.4.0") -SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "spdlog 1.4.0") -SET(CPACK_PACKAGE_NAME "spdlog") -SET(CPACK_PACKAGE_RELOCATABLE "true") -SET(CPACK_PACKAGE_VENDOR "Gabi Melman") -SET(CPACK_PACKAGE_VERSION "1.4.0") -SET(CPACK_PACKAGE_VERSION_MAJOR "1") -SET(CPACK_PACKAGE_VERSION_MINOR "4") -SET(CPACK_PACKAGE_VERSION_PATCH "0") -SET(CPACK_PROJECT_URL "https://github.com/gabime/spdlog") -SET(CPACK_RESOURCE_FILE_LICENSE "/usr/share/cmake-3.6.2/Templates/CPack.GenericLicense.txt") -SET(CPACK_RESOURCE_FILE_README "/usr/share/cmake-3.6.2/Templates/CPack.GenericDescription.txt") -SET(CPACK_RESOURCE_FILE_WELCOME "/usr/share/cmake-3.6.2/Templates/CPack.GenericWelcome.txt") -SET(CPACK_SET_DESTDIR "OFF") -SET(CPACK_SOURCE_7Z "") -SET(CPACK_SOURCE_CYGWIN "ON") -SET(CPACK_SOURCE_GENERATOR "CygwinSource") -SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackSourceConfig.cmake") -SET(CPACK_SOURCE_TBZ2 "") -SET(CPACK_SOURCE_TGZ "") -SET(CPACK_SOURCE_TXZ "") -SET(CPACK_SOURCE_TZ "") -SET(CPACK_SOURCE_ZIP "") -SET(CPACK_SYSTEM_NAME "CYGWIN") -SET(CPACK_TOPLEVEL_TAG "CYGWIN") -SET(CPACK_WIX_SIZEOF_VOID_P "8") - -if(NOT CPACK_PROPERTIES_FILE) - set(CPACK_PROPERTIES_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackProperties.cmake") -endif() - -if(EXISTS ${CPACK_PROPERTIES_FILE}) - include(${CPACK_PROPERTIES_FILE}) -endif() From d37def7a72942e47e9e444ec7d031a507f7c1ae2 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Mon, 1 Jul 2019 13:19:10 +0300 Subject: [PATCH 10/23] Delete CPackSourceConfig.cmake --- cygwin/CPackSourceConfig.cmake | 89 ---------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 cygwin/CPackSourceConfig.cmake diff --git a/cygwin/CPackSourceConfig.cmake b/cygwin/CPackSourceConfig.cmake deleted file mode 100644 index 6b869677..00000000 --- a/cygwin/CPackSourceConfig.cmake +++ /dev/null @@ -1,89 +0,0 @@ -# This file will be configured to contain variables for CPack. These variables -# should be set in the CMake list file of the project before CPack module is -# included. The list of available CPACK_xxx variables and their associated -# documentation may be obtained using -# cpack --help-variable-list -# -# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME) -# and some are specific to a generator -# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables -# usually begin with CPACK__xxxx. - - -SET(CPACK_BINARY_7Z "") -SET(CPACK_BINARY_BUNDLE "") -SET(CPACK_BINARY_CYGWIN "") -SET(CPACK_BINARY_DEB "") -SET(CPACK_BINARY_DRAGNDROP "") -SET(CPACK_BINARY_IFW "") -SET(CPACK_BINARY_NSIS "") -SET(CPACK_BINARY_OSXX11 "") -SET(CPACK_BINARY_PACKAGEMAKER "") -SET(CPACK_BINARY_RPM "") -SET(CPACK_BINARY_STGZ "") -SET(CPACK_BINARY_TBZ2 "") -SET(CPACK_BINARY_TGZ "") -SET(CPACK_BINARY_TXZ "") -SET(CPACK_BINARY_TZ "") -SET(CPACK_BINARY_WIX "") -SET(CPACK_BINARY_ZIP "") -SET(CPACK_CMAKE_GENERATOR "Unix Makefiles") -SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE") -SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE") -SET(CPACK_GENERATOR "CygwinSource") -SET(CPACK_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#") -SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "0") -SET(CPACK_INSTALLED_DIRECTORIES "/cygdrive/e/devel/spdlog;/") -SET(CPACK_INSTALL_CMAKE_PROJECTS "") -SET(CPACK_INSTALL_PREFIX "/usr/local") -SET(CPACK_MODULE_PATH "") -SET(CPACK_NSIS_DISPLAY_NAME "spdlog 1.4.0") -SET(CPACK_NSIS_INSTALLER_ICON_CODE "") -SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") -SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") -SET(CPACK_NSIS_PACKAGE_NAME "spdlog 1.4.0") -SET(CPACK_OUTPUT_CONFIG_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackConfig.cmake") -SET(CPACK_PACKAGE_CONTACT "Gabi Melman ") -SET(CPACK_PACKAGE_DEFAULT_LOCATION "/") -SET(CPACK_PACKAGE_DESCRIPTION_FILE "/usr/share/cmake-3.6.2/Templates/CPack.GenericDescription.txt") -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "spdlog built using CMake") -SET(CPACK_PACKAGE_FILE_NAME "spdlog-1.4.0-Source") -SET(CPACK_PACKAGE_INSTALL_DIRECTORY "spdlog 1.4.0") -SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "spdlog 1.4.0") -SET(CPACK_PACKAGE_NAME "spdlog") -SET(CPACK_PACKAGE_RELOCATABLE "true") -SET(CPACK_PACKAGE_VENDOR "Gabi Melman") -SET(CPACK_PACKAGE_VERSION "1.4.0") -SET(CPACK_PACKAGE_VERSION_MAJOR "1") -SET(CPACK_PACKAGE_VERSION_MINOR "4") -SET(CPACK_PACKAGE_VERSION_PATCH "0") -SET(CPACK_PROJECT_URL "https://github.com/gabime/spdlog") -SET(CPACK_RESOURCE_FILE_LICENSE "/usr/share/cmake-3.6.2/Templates/CPack.GenericLicense.txt") -SET(CPACK_RESOURCE_FILE_README "/usr/share/cmake-3.6.2/Templates/CPack.GenericDescription.txt") -SET(CPACK_RESOURCE_FILE_WELCOME "/usr/share/cmake-3.6.2/Templates/CPack.GenericWelcome.txt") -SET(CPACK_SET_DESTDIR "OFF") -SET(CPACK_SOURCE_7Z "") -SET(CPACK_SOURCE_CYGWIN "ON") -SET(CPACK_SOURCE_GENERATOR "CygwinSource") -SET(CPACK_SOURCE_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#") -SET(CPACK_SOURCE_INSTALLED_DIRECTORIES "/cygdrive/e/devel/spdlog;/") -SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackSourceConfig.cmake") -SET(CPACK_SOURCE_PACKAGE_FILE_NAME "spdlog-1.4.0-Source") -SET(CPACK_SOURCE_TBZ2 "") -SET(CPACK_SOURCE_TGZ "") -SET(CPACK_SOURCE_TOPLEVEL_TAG "CYGWIN-Source") -SET(CPACK_SOURCE_TXZ "") -SET(CPACK_SOURCE_TZ "") -SET(CPACK_SOURCE_ZIP "") -SET(CPACK_STRIP_FILES "") -SET(CPACK_SYSTEM_NAME "CYGWIN") -SET(CPACK_TOPLEVEL_TAG "CYGWIN-Source") -SET(CPACK_WIX_SIZEOF_VOID_P "8") - -if(NOT CPACK_PROPERTIES_FILE) - set(CPACK_PROPERTIES_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackProperties.cmake") -endif() - -if(EXISTS ${CPACK_PROPERTIES_FILE}) - include(${CPACK_PROPERTIES_FILE}) -endif() From 7c8f45747cd34176052de5d348e8bff5918fad19 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Mon, 1 Jul 2019 13:19:18 +0300 Subject: [PATCH 11/23] Delete spdlogConfig.cmake --- cygwin/spdlogConfig.cmake | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 cygwin/spdlogConfig.cmake diff --git a/cygwin/spdlogConfig.cmake b/cygwin/spdlogConfig.cmake deleted file mode 100644 index 6cdd5446..00000000 --- a/cygwin/spdlogConfig.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright(c) 2019 spdlog authors -# Distributed under the MIT License (http://opensource.org/licenses/MIT) - -find_package(Threads REQUIRED) - -set(SPDLOG_FMT_EXTERNAL OFF) -set(config_targets_file spdlogConfigTargets.cmake) - -if(SPDLOG_FMT_EXTERNAL) - include(CMakeFindDependencyMacro) - find_dependency(fmt CONFIG) -endif() - - -include("${CMAKE_CURRENT_LIST_DIR}/${config_targets_file}") From e7889e9ce23f0a9e293ed3c0a9207468bf6b764b Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Mon, 1 Jul 2019 13:19:25 +0300 Subject: [PATCH 12/23] Delete spdlogConfigVersion.cmake --- cygwin/spdlogConfigVersion.cmake | 46 -------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 cygwin/spdlogConfigVersion.cmake diff --git a/cygwin/spdlogConfigVersion.cmake b/cygwin/spdlogConfigVersion.cmake deleted file mode 100644 index 66f87f7e..00000000 --- a/cygwin/spdlogConfigVersion.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# This is a basic version file for the Config-mode of find_package(). -# It is used by write_basic_package_version_file() as input file for configure_file() -# to create a version-file which can be installed along a config.cmake file. -# -# The created file sets PACKAGE_VERSION_EXACT if the current version string and -# the requested version string are exactly the same and it sets -# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version, -# but only if the requested major version is the same as the current one. -# The variable CVF_VERSION must be set before calling configure_file(). - - -set(PACKAGE_VERSION "1.4.0") - -if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - - if("1.4.0" MATCHES "^([0-9]+)\\.") - set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") - else() - set(CVF_VERSION_MAJOR "1.4.0") - endif() - - if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) - set(PACKAGE_VERSION_COMPATIBLE TRUE) - else() - set(PACKAGE_VERSION_COMPATIBLE FALSE) - endif() - - if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) - set(PACKAGE_VERSION_EXACT TRUE) - endif() -endif() - - -# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: -if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "") - return() -endif() - -# check that the installed version has the same 32/64bit-ness as the one which is currently searching: -if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8") - math(EXPR installedBits "8 * 8") - set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") - set(PACKAGE_VERSION_UNSUITABLE TRUE) -endif() From 3c64b3da9775df695a3c52ee0475c310810640d1 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Mon, 1 Jul 2019 12:32:12 +0200 Subject: [PATCH 13/23] Added example meson.build --- .gitignore | 1 + example/meson.build | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 example/meson.build diff --git a/.gitignore b/.gitignore index f3444852..cf0563ad 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ example/* !example/example.sln !example/example.vcxproj !example/CMakeLists.txt +!example/meson.build !example/multisink.cpp !example/jni diff --git a/example/meson.build b/example/meson.build new file mode 100644 index 00000000..0a5a53c7 --- /dev/null +++ b/example/meson.build @@ -0,0 +1,8 @@ +example_matrix = [ + ['spdlog-example', spdlog_dep], + ['spdlog-example-ho', spdlog_headeronly_dep], +] + +foreach i : example_matrix + test_exe = executable(i[0], ['example.cpp'], dependencies: i[1]) +endforeach From 2a2a34601c316f540b1dd21d7ca36f613e10c783 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Mon, 1 Jul 2019 12:37:18 +0200 Subject: [PATCH 14/23] moved scripts into subdirectory --- meson.build | 2 +- clang_tidy.sh => scripts/clang_tidy.sh | 5 +++++ extract_version.py => scripts/extract_version.py | 2 +- format.sh => scripts/format.sh | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) rename clang_tidy.sh => scripts/clang_tidy.sh (53%) rename extract_version.py => scripts/extract_version.py (85%) rename format.sh => scripts/format.sh (87%) diff --git a/meson.build b/meson.build index 899ba1f4..abb51f71 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('spdlog', ['cpp'], license : 'MIT', - version : run_command(find_program('extract_version.py')).stdout().strip(), + version : run_command(find_program('scripts/extract_version.py')).stdout().strip(), default_options : [ 'warning_level=3', 'cpp_std=c++11', diff --git a/clang_tidy.sh b/scripts/clang_tidy.sh similarity index 53% rename from clang_tidy.sh rename to scripts/clang_tidy.sh index 9ced07f1..8b1b5f88 100755 --- a/clang_tidy.sh +++ b/scripts/clang_tidy.sh @@ -1 +1,6 @@ +#!/bin/bash + +cd "$(dirname "$0")" +cd .. + clang-tidy example/example.cpp -- -I ./include diff --git a/extract_version.py b/scripts/extract_version.py similarity index 85% rename from extract_version.py rename to scripts/extract_version.py index a6f791e9..960df51b 100755 --- a/extract_version.py +++ b/scripts/extract_version.py @@ -3,7 +3,7 @@ import os import re -base_path = os.path.abspath(os.path.dirname(__file__)) +base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) config_h = os.path.join(base_path, 'include', 'spdlog', 'version.h') data = {'MAJOR': 0, 'MINOR': 0, 'PATCH': 0} reg = re.compile(r'^\s*#define\s+SPDLOG_VER_([A-Z]+)\s+([0-9]+).*$') diff --git a/format.sh b/scripts/format.sh similarity index 87% rename from format.sh rename to scripts/format.sh index 97bbea23..bffbb4c1 100755 --- a/format.sh +++ b/scripts/format.sh @@ -1,3 +1,8 @@ +#!/bin/bash + +cd "$(dirname "$0")" +cd .. + echo -n "Running dos2unix " find . -name "*\.h" -o -name "*\.cpp"|grep -v bundled|xargs -I {} sh -c "dos2unix '{}' 2>/dev/null; echo -n '.'" echo From 7a686d4d216c60978dc55f03ea995fba52abb87b Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Mon, 1 Jul 2019 15:03:53 +0300 Subject: [PATCH 15/23] Update CMakeLists.txt --- tests/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ebd31807..e6d258d8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,7 @@ project(spdlog_utests CXX) +include(../cmake/utils.cmake) + find_package(PkgConfig) if(PkgConfig_FOUND) pkg_check_modules(systemd libsystemd) From 64a549d051d759d391a905bda05d65ed56199e18 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Mon, 1 Jul 2019 23:19:57 +0300 Subject: [PATCH 16/23] Update meson.build --- meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/meson.build b/meson.build index abb51f71..b7d7d452 100644 --- a/meson.build +++ b/meson.build @@ -13,7 +13,6 @@ project('spdlog', ['cpp'], # ------------------------ # --- Dependencies --- # ------------------------ - dep_list = [] compile_args = [] From 751ff59e2a2f5d5ec4a0841e752251a1dda05802 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Mon, 1 Jul 2019 23:51:05 +0300 Subject: [PATCH 17/23] Update .travis.yml --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb53e714..ddf03015 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,9 +97,9 @@ script: -DSPDLOG_BUILD_EXAMPLE_HO=ON \ -DSPDLOG_BUILD_BENCH=OFF \ -DSPDLOG_BUILD_TESTS=ON \ - -DSPDLOG_BUILD_TESTS_HO=ON \ - -DSPDLOG_SANITIZE_ADDRESS=$ASAN \ - -DSPDLOG_SANITIZE_THREAD=$TSAN + -DSPDLOG_BUILD_TESTS_HO=OFf \ + -DSPDLOG_SANITIZE_ADDRESS=$ASAN + - make VERBOSE=1 -j2 - ctest -j2 --output-on-failure From b97c16a636f08f9a0b3f557342cda250a638236c Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Mon, 1 Jul 2019 23:55:09 +0300 Subject: [PATCH 18/23] Update appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 731c82a4..33c5d271 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,7 +26,7 @@ build_script: set PATH=C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH% - cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DSPDLOG_BUILD_EXAMPLE=ON -DSPDLOG_BUILD_EXAMPLE_HO=ON -DSPDLOG_BUILD_TESTS=ON -DSPDLOG_BUILD_TESTS_HO=ON + cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DSPDLOG_BUILD_EXAMPLE=ON -DSPDLOG_BUILD_EXAMPLE_HO=ON -DSPDLOG_BUILD_TESTS=ON -DSPDLOG_BUILD_TESTS_HO=OFF cmake --build . --config %BUILD_TYPE% From 89e6d668720c906ebb9770507a678f9a2cb7df19 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Tue, 2 Jul 2019 08:41:15 +0300 Subject: [PATCH 19/23] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ddf03015..0854b796 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,11 +39,11 @@ addons: &clang6 matrix: include: # Test gcc-4.8: C++11, Build=Debug/Release - - env: GCC_VERSION=4.8 BUILD_TYPE=Debug CPP=11 + - env: GCC_VERSION=4.8 BUILD_TYPE=Debug CPP=14 os: linux addons: *gcc48 - - env: GCC_VERSION=4.8 BUILD_TYPE=Release CPP=11 + - env: GCC_VERSION=4.8 BUILD_TYPE=Release CPP=14 os: linux addons: *gcc48 From 4d27419d7c40b7efce490379f5ae462771702772 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Tue, 2 Jul 2019 09:50:13 +0300 Subject: [PATCH 20/23] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d34c917..5ffd9bc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ endif() #--------------------------------------------------------------------------------------- # Compiler config #--------------------------------------------------------------------------------------- -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) From 10938978389b9ddf84fe1513488ffe88bd65bc75 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Tue, 2 Jul 2019 09:57:42 +0300 Subject: [PATCH 21/23] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ffd9bc5..4d34c917 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ endif() #--------------------------------------------------------------------------------------- # Compiler config #--------------------------------------------------------------------------------------- -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) From 13477e5478eec08b7dd803ed50c72c37129af2ed Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Tue, 2 Jul 2019 09:58:23 +0300 Subject: [PATCH 22/23] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0854b796..ddf03015 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,11 +39,11 @@ addons: &clang6 matrix: include: # Test gcc-4.8: C++11, Build=Debug/Release - - env: GCC_VERSION=4.8 BUILD_TYPE=Debug CPP=14 + - env: GCC_VERSION=4.8 BUILD_TYPE=Debug CPP=11 os: linux addons: *gcc48 - - env: GCC_VERSION=4.8 BUILD_TYPE=Release CPP=14 + - env: GCC_VERSION=4.8 BUILD_TYPE=Release CPP=11 os: linux addons: *gcc48 From 75bb4346b24a90cd6ebc2bb1163af20a15a06199 Mon Sep 17 00:00:00 2001 From: "Zhiyuan \"Jerry\" Ma" Date: Wed, 3 Jul 2019 17:01:17 -0400 Subject: [PATCH 23/23] Add missing include --- include/spdlog/sinks/ansicolor_sink-inl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/spdlog/sinks/ansicolor_sink-inl.h b/include/spdlog/sinks/ansicolor_sink-inl.h index 74b9c3ec..13a0691e 100644 --- a/include/spdlog/sinks/ansicolor_sink-inl.h +++ b/include/spdlog/sinks/ansicolor_sink-inl.h @@ -7,6 +7,7 @@ #include "spdlog/sinks/ansicolor_sink.h" #endif +#include "spdlog/details/pattern_formatter.h" #include "spdlog/details/os.h" namespace spdlog { @@ -132,4 +133,4 @@ SPDLOG_INLINE ansicolor_stderr_sink::ansicolor_stderr_sink(color_m {} } // namespace sinks -} // namespace spdlog \ No newline at end of file +} // namespace spdlog