From 7f8f6474fb98e8dae83c5a1b40fdced29399aaaa Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Thu, 17 Sep 2026 08:24:34 +1000 Subject: [PATCH 01/17] markdown --- AUTHORS.md | 2 +- FAQ.md | 3 +-- INSTALL.md | 3 +-- NEWS.md | 3 +-- README.md | 2 +- TODO.md | 2 +- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 9f42e67..b5cf687 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,4 +1,4 @@ -# FastFormat - Authors +# FastFormat - Authors ## Major Contributors: diff --git a/FAQ.md b/FAQ.md index 7bdaff7..d977ade 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1,5 +1,4 @@ -FastFormat - FAQ -================ +# FastFormat - FAQ Updated: 11th December 2010 diff --git a/INSTALL.md b/INSTALL.md index 13b4aa2..be1504a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,5 +1,4 @@ -FastFormat - Install -==================== +# FastFormat - Installation and Use Updated: 26th September 2015 diff --git a/NEWS.md b/NEWS.md index 7850d2d..8438392 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,4 @@ -FastFormat - News -================= +# FastFormat - News Updated: 21st March 2021 diff --git a/README.md b/README.md index 7d1a883..709f627 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# FastFormat +# FastFormat The fastest, most robust C++ formatting library Git access to the [FastFormat](http://fastformat.org/) formatting library (C++) diff --git a/TODO.md b/TODO.md index 62fee2b..a6b6bbc 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1,4 @@ -# FastFormat - To Do +# FastFormat - TODO ---- From 89c2dde664b455fe6db62812ccf9195cb573eee7 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Thu, 17 Sep 2026 08:25:37 +1000 Subject: [PATCH 02/17] misc --- .../example.overload.3.record_insert.cpp | 10 +- scripts/make_hdrs.rb | 786 +++++++++--------- 2 files changed, 400 insertions(+), 396 deletions(-) diff --git a/examples/example.overload.3.record_insert/example.overload.3.record_insert.cpp b/examples/example.overload.3.record_insert/example.overload.3.record_insert.cpp index 17fb153..434c0c2 100644 --- a/examples/example.overload.3.record_insert/example.overload.3.record_insert.cpp +++ b/examples/example.overload.3.record_insert/example.overload.3.record_insert.cpp @@ -1,10 +1,10 @@ /* ///////////////////////////////////////////////////////////////////////// - * File: example.overload.3.record_insert.cpp + * File: example.overload.3.record_insert.cpp * - * Purpose: Implementation file for the example.overload.3.record_insert project. + * Purpose: Implementation file for the example.overload.3.record_insert project. * - * Created: 20th September 2008 - * Updated: 6th February 2024 + * Created: 20th September 2008 + * Updated: 18th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -176,7 +176,7 @@ static stlsoft::basic_shim_string make_shim_string(T const& t) static stlsoft::basic_shim_string - make_slice(const int val) +make_slice(const int val) { if(intNaN == val) { diff --git a/scripts/make_hdrs.rb b/scripts/make_hdrs.rb index b270975..ff589a6 100644 --- a/scripts/make_hdrs.rb +++ b/scripts/make_hdrs.rb @@ -1,23 +1,27 @@ # Created: 21st September 2006 -# Updated: 20th April 2009 +# Updated: 28th August 2026 +# +# Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems +# Copyright (c) 2006-2019, Matthew Wilson and Synesis Software +# All rights reserved. require 'recls' -REL_DIR = "../include/fastformat/internal/generated" +REL_DIR = "../include/fastformat/internal/generated" -NUM_PARAMS = 48 -ENDL = "\n" +NUM_PARAMS = 48 +ENDL = "\n" dir = Recls::stat(REL_DIR) if not dir - puts "Cannot stat #{REL_DIR}. Run this only from the scripts directory" - exit + puts "Cannot stat #{REL_DIR}. Run this only from the scripts directory" + exit end -path1 = Recls::combinePaths(REL_DIR, "helper_functions.hpp") -path2 = Recls::combinePaths(REL_DIR, "api_functions.hpp") +path1 = Recls::combinePaths(REL_DIR, "helper_functions.hpp") +path2 = Recls::combinePaths(REL_DIR, "api_functions.hpp") puts "Generating helper functions: #{path1}" @@ -35,160 +39,160 @@ (0 .. NUM_PARAMS).each \ { |param| - # fmt_inner_helper_?() - - f1 << "" << "\n" - f1 << "template " << "\n" - f1 << "inline S& fmt_inner_helper_#{param}(S& sink, int flags" << "\n" - if 0 == param - f1 << " , ff_format_element_t const *formatElements, size_t numFormatElements, size_t numResultElements)" << "\n" - else - f1 << " , ff_format_element_t const *formatElements, size_t numFormatElements, size_t numResultElements" << "\n" - (1 ... param).each \ - { |n| - f1 << " , ff_char_t const* p#{n-1}, size_t l#{n-1}" << "\n" - } - f1 << " , ff_char_t const* p#{param-1}, size_t l#{param-1})" << "\n" - end - f1 << "{" << "\n" - f1 << " FASTFORMAT_DECLARE_fmt_slices_();" << "\n" - f1 << " defs::slices_buffer_t results(numResultElements);" << "\n" - f1 << " size_t actualNumResultElements;" << "\n" - if param > 0 - f1 << " ff_string_slice_t prms[#{param}];" << "\n" - f1 << "" << "\n" - end - (0 ... param).each \ - { |n| - f1 << " prms[#{n}].len = l#{n};" << "\n" - f1 << " prms[#{n}].ptr = p#{n};" << "\n" - } - f1 << "" << "\n" - if 0 == param - f1 << " size_t cchTotal = fastformat_fillReplacements(&results[0], formatElements, numFormatElements, NULL, 0, NULL, NULL, &actualNumResultElements);" << "\n" - else - f1 << " size_t cchTotal = fastformat_fillReplacements(&results[0], formatElements, numFormatElements, &prms[0], STLSOFT_NUM_ELEMENTS(prms), NULL, NULL, &actualNumResultElements);" << "\n" - end - f1 << " FASTFORMAT_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_API((actualNumResultElements <= results.size()), \"actual number of result elements exceeds capacity\");" << "\n" - if param < 2 - f1 << " // This is a function call, to facilitate customisation" << "\n" - end - f1 << " return FASTFORMAT_INVOKE_fmt_slices_(sink, flags, cchTotal, actualNumResultElements, &results[0]);" << "\n" - f1 << "}" << "\n" - - if param == 0 - f1 << "template " << "\n" - else - f1 << "template" << "\n" - end - - if 0 == param - f1 << "inline S& fmt_outer_helper_#{param}(S& sink, int flags, ff_format_element_t const *formatElements, size_t numFormatElements, size_t numResultElements)" << "\n" - else - f1 << "inline S& fmt_outer_helper_#{param}(S& sink, int flags, ff_format_element_t const *formatElements, size_t numFormatElements, size_t numResultElements" << "\n" - args = "" - (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } - f1 << args << ")" << "\n" - end - f1 << "{" << "\n" - if 0 == param - f1 << " return fmt_inner_helper_#{param}(sink, flags, formatElements, numFormatElements, numResultElements);\n" - else - f1 << " FASTFORMAT_DECLARE_c_str_datalen_PAIR_();" << "\n" - f1 << "\n" - f1 << " return fmt_inner_helper_#{param}(sink, flags, formatElements, numFormatElements, numResultElements" << "\n" - (1 ... param).each \ - { |n| - f1 << " , FASTFORMAT_INVOKE_SHIM_PAIR_(arg#{n-1})" << "\n" - } - f1 << " , FASTFORMAT_INVOKE_SHIM_PAIR_(arg#{param-1}));" << "\n" - end - f1 << "}" << "\n" - - - # write_helper_?() - - f1 << "" << "\n" - f1 << "template " << "\n" - if 0 == param - f1 << "inline S& write_inner_helper_#{param}(S& sink, int flags)" << "\n" - else - f1 << "inline S& write_inner_helper_#{param}(S& sink, int flags" << "\n" - (1 ... param).each \ - { |n| - f1 << " , ff_char_t const* p#{n-1}, size_t l#{n-1}" << "\n" - } - f1 << " , ff_char_t const* p#{param-1}, size_t l#{param-1})" << "\n" - end - f1 << "{" << "\n" - f1 << " FASTFORMAT_DECLARE_fmt_slices_();" << "\n" - if param > 0 - f1 << " ff_string_slice_t prms[#{param}];" << "\n" - f1 << "" << "\n" - end - (0 ... param).each \ - { |n| - f1 << " prms[#{n}].len = l#{n};" << "\n" - f1 << " prms[#{n}].ptr = p#{n};" << "\n" - } - if 0 == param - f1 << " size_t cchTotal = 0;" << "\n" - else - f1 << "" << "\n" - f1 << " size_t cchTotal = l0" - (1 ... param).each \ - { |n| - f1 << " + l#{n}" - } - f1 << ";" << "\n" - end - f1 << "" << "\n" - if param > 1 and param < 5 - f1 << " // This is a function call, to facilitate customisation" << "\n" - end - if 0 == param - f1 << " return FASTFORMAT_INVOKE_fmt_slices_(sink, flags, cchTotal, 0, NULL);" << "\n" - else - f1 << " return FASTFORMAT_INVOKE_fmt_slices_(sink, flags, cchTotal, STLSOFT_NUM_ELEMENTS(prms), &prms[0]);" << "\n" - end - - f1 << "}" << "\n" - - if param == 0 - f1 << "template " << "\n" - else - f1 << "template" << "\n" - end - if 0 == param - f1 << "inline S& write_outer_helper_#{param}(S& sink, int flags)" << "\n" - else - f1 << "inline S& write_outer_helper_#{param}(S& sink, int flags" << "\n" - args = "" - (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } - f1 << args << ")" << "\n" - end - f1 << "{" << "\n" - if 0 == param - f1 << " return write_inner_helper_#{param}(sink, flags);\n" - else - f1 << " FASTFORMAT_DECLARE_c_str_datalen_PAIR_();" << "\n" - f1 << "\n" - f1 << " return write_inner_helper_#{param}(sink, flags" << "\n" - (1 ... param).each \ - { |n| - f1 << " , FASTFORMAT_INVOKE_SHIM_PAIR_(arg#{n-1})" << "\n" - } - f1 << " , FASTFORMAT_INVOKE_SHIM_PAIR_(arg#{param-1}));" << "\n" - end - f1 << "}" << "\n" + # fmt_inner_helper_?() + + f1 << "" << "\n" + f1 << "template " << "\n" + f1 << "inline S& fmt_inner_helper_#{param}(S& sink, int flags" << "\n" + if 0 == param + f1 << " , ff_format_element_t const *formatElements, size_t numFormatElements, size_t numResultElements)" << "\n" + else + f1 << " , ff_format_element_t const *formatElements, size_t numFormatElements, size_t numResultElements" << "\n" + (1 ... param).each \ + { |n| + f1 << " , ff_char_t const* p#{n-1}, size_t l#{n-1}" << "\n" + } + f1 << " , ff_char_t const* p#{param-1}, size_t l#{param-1})" << "\n" + end + f1 << "{" << "\n" + f1 << " FASTFORMAT_DECLARE_fmt_slices_();" << "\n" + f1 << " defs::slices_buffer_t results(numResultElements);" << "\n" + f1 << " size_t actualNumResultElements;" << "\n" + if param > 0 + f1 << " ff_string_slice_t prms[#{param}];" << "\n" + f1 << "" << "\n" + end + (0 ... param).each \ + { |n| + f1 << " prms[#{n}].len = l#{n};" << "\n" + f1 << " prms[#{n}].ptr = p#{n};" << "\n" + } + f1 << "" << "\n" + if 0 == param + f1 << " size_t cchTotal = fastformat_fillReplacements(&results[0], formatElements, numFormatElements, NULL, 0, NULL, NULL, &actualNumResultElements);" << "\n" + else + f1 << " size_t cchTotal = fastformat_fillReplacements(&results[0], formatElements, numFormatElements, &prms[0], STLSOFT_NUM_ELEMENTS(prms), NULL, NULL, &actualNumResultElements);" << "\n" + end + f1 << " FASTFORMAT_CONTRACT_ENFORCE_POSTCONDITION_PARAMS_API((actualNumResultElements <= results.size()), \"actual number of result elements exceeds capacity\");" << "\n" + if param < 2 + f1 << " // This is a function call, to facilitate customisation" << "\n" + end + f1 << " return FASTFORMAT_INVOKE_fmt_slices_(sink, flags, cchTotal, actualNumResultElements, &results[0]);" << "\n" + f1 << "}" << "\n" + + if param == 0 + f1 << "template " << "\n" + else + f1 << "template" << "\n" + end + + if 0 == param + f1 << "inline S& fmt_outer_helper_#{param}(S& sink, int flags, ff_format_element_t const *formatElements, size_t numFormatElements, size_t numResultElements)" << "\n" + else + f1 << "inline S& fmt_outer_helper_#{param}(S& sink, int flags, ff_format_element_t const *formatElements, size_t numFormatElements, size_t numResultElements" << "\n" + args = "" + (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } + f1 << args << ")" << "\n" + end + f1 << "{" << "\n" + if 0 == param + f1 << " return fmt_inner_helper_#{param}(sink, flags, formatElements, numFormatElements, numResultElements);\n" + else + f1 << " FASTFORMAT_DECLARE_c_str_datalen_PAIR_();" << "\n" + f1 << "\n" + f1 << " return fmt_inner_helper_#{param}(sink, flags, formatElements, numFormatElements, numResultElements" << "\n" + (1 ... param).each \ + { |n| + f1 << " , FASTFORMAT_INVOKE_SHIM_PAIR_(arg#{n-1})" << "\n" + } + f1 << " , FASTFORMAT_INVOKE_SHIM_PAIR_(arg#{param-1}));" << "\n" + end + f1 << "}" << "\n" + + + # write_helper_?() + + f1 << "" << "\n" + f1 << "template " << "\n" + if 0 == param + f1 << "inline S& write_inner_helper_#{param}(S& sink, int flags)" << "\n" + else + f1 << "inline S& write_inner_helper_#{param}(S& sink, int flags" << "\n" + (1 ... param).each \ + { |n| + f1 << " , ff_char_t const* p#{n-1}, size_t l#{n-1}" << "\n" + } + f1 << " , ff_char_t const* p#{param-1}, size_t l#{param-1})" << "\n" + end + f1 << "{" << "\n" + f1 << " FASTFORMAT_DECLARE_fmt_slices_();" << "\n" + if param > 0 + f1 << " ff_string_slice_t prms[#{param}];" << "\n" + f1 << "" << "\n" + end + (0 ... param).each \ + { |n| + f1 << " prms[#{n}].len = l#{n};" << "\n" + f1 << " prms[#{n}].ptr = p#{n};" << "\n" + } + if 0 == param + f1 << " size_t cchTotal = 0;" << "\n" + else + f1 << "" << "\n" + f1 << " size_t cchTotal = l0" + (1 ... param).each \ + { |n| + f1 << " + l#{n}" + } + f1 << ";" << "\n" + end + f1 << "" << "\n" + if param > 1 and param < 5 + f1 << " // This is a function call, to facilitate customisation" << "\n" + end + if 0 == param + f1 << " return FASTFORMAT_INVOKE_fmt_slices_(sink, flags, cchTotal, 0, NULL);" << "\n" + else + f1 << " return FASTFORMAT_INVOKE_fmt_slices_(sink, flags, cchTotal, STLSOFT_NUM_ELEMENTS(prms), &prms[0]);" << "\n" + end + + f1 << "}" << "\n" + + if param == 0 + f1 << "template " << "\n" + else + f1 << "template" << "\n" + end + if 0 == param + f1 << "inline S& write_outer_helper_#{param}(S& sink, int flags)" << "\n" + else + f1 << "inline S& write_outer_helper_#{param}(S& sink, int flags" << "\n" + args = "" + (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } + f1 << args << ")" << "\n" + end + f1 << "{" << "\n" + if 0 == param + f1 << " return write_inner_helper_#{param}(sink, flags);\n" + else + f1 << " FASTFORMAT_DECLARE_c_str_datalen_PAIR_();" << "\n" + f1 << "\n" + f1 << " return write_inner_helper_#{param}(sink, flags" << "\n" + (1 ... param).each \ + { |n| + f1 << " , FASTFORMAT_INVOKE_SHIM_PAIR_(arg#{n-1})" << "\n" + } + f1 << " , FASTFORMAT_INVOKE_SHIM_PAIR_(arg#{param-1}));" << "\n" + end + f1 << "}" << "\n" } f1.close() @@ -209,235 +213,235 @@ (0 .. NUM_PARAMS).each \ { |param| - plural = (1 == param) ? "" : "s" - - # fmt() - - if param > 0 - f2 << "/** Formats #{param} object#{plural} of arbitrary type to the given sink" << ENDL - f2 << " * \\ingroup group__interface_functions__api_format" << ENDL - f2 << " * \\param sink The sink to receive the formatted result" << ENDL - f2 << " * \\param format The format string that defines the formatted result" << ENDL - (0 ... param).each { |n| f2 << " * \\param arg#{n} parameter #{n}" << ENDL } - f2 << " * \\note The \\c c_str_data_a() and \\c c_str_len_a() string access shims are applied to the format and to each parameter, to form a string slice" << ENDL - f2 << " */" << ENDL - - f2 << "template 0 - targs = "" - (0 ... param).each { |n| targs = targs + ", typename A#{n}" } - f2 << targs << "\n" - end - f2 << ">" << "\n" - f2 << "inline S& fmt(S& sink, F const& format" << "\n" - args = "" - (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } - f2 << args << ")" << "\n" - f2 << "{" << "\n" - f2 << " FASTFORMAT_DECLARE_filter_type_();" << "\n" - f2 << " FASTFORMAT_DECLARE_c_str_datalen_PAIR_();" << "\n" - f2 << "" << "\n" - f2 << " const size_t cchFormat = FASTFORMAT_INVOKE_c_str_len_(format);" << "\n" - f2 << "#ifdef FASTFORMAT_NO_USE_JIT_CACHE" << "\n" - f2 << " defs::format_elements_t formatElements((1 + cchFormat) / 2);" << "\n" - f2 << " size_t numFormatElements;" << "\n" - f2 << " size_t numResultElements;" << "\n" - f2 << " unsigned n = fastformat_parseFormat(FASTFORMAT_INVOKE_c_str_data_(format), cchFormat, &formatElements[0], formatElements.size(), NULL, NULL);" << "\n" - f2 << " numFormatElements = n & 0xffff;" << "\n" - f2 << " numResultElements = n >> 16;" << "\n" - f2 << " ff_format_element_t *elements = &formatElements[0];" << "\n" - f2 << "" << "\n" - f2 << " FASTFORMAT_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API(numFormatElements <= formatElements.size(), \"number of pattern elements cannot exceed available capacity\");" << "\n" - f2 << "#else /* ? FASTFORMAT_NO_USE_JIT_CACHE */" << "\n" - f2 << " ff_format_element_t const *elements;" << "\n" - f2 << " size_t numFormatElements;" << "\n" - f2 << " size_t numResultElements;" << "\n" - f2 << " unsigned n = fastformat_lookupPattern(FASTFORMAT_INVOKE_c_str_data_(format), cchFormat, &elements);" << "\n" - f2 << " numFormatElements = n & 0xffff;" << "\n" - f2 << " numResultElements = n >> 16;" << "\n" - f2 << "#endif /* FASTFORMAT_NO_USE_JIT_CACHE */" << "\n" - f2 << "" << "\n" - if param < 2 - f2 << " // This needs to be a function call - RVL!" << "\n" - end - if 0 == param - f2 << " return FASTFORMAT_QUALIFY_HELPER_(fmt_outer_helper_#{param})(sink, 0, elements, numFormatElements, numResultElements);" << "\n" - else - f2 << " return FASTFORMAT_QUALIFY_HELPER_(fmt_outer_helper_#{param})(sink, 0, elements, numFormatElements, numResultElements" << "\n" - (1 ... param).each \ - { |n| - f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{n-1}, &arg#{n-1}, static_cast(0))" << "\n" - } - f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{param-1}, &arg#{param-1}, static_cast(0)));" << "\n" - end - - f2 << "}" << "\n" - f2 << "" << "\n" - - # fmtln() - - f2 << "/** Formats #{param} object#{plural} of arbitrary type to the given sink, appending a newline" << ENDL - f2 << " * \\ingroup group__interface_functions__api_format" << ENDL - f2 << " * \\param sink The sink to receive the formatted result" << ENDL - f2 << " * \\param format The format string that defines the formatted result" << ENDL - (0 ... param).each { |n| f2 << " * \\param arg#{n} parameter #{n}" << ENDL } - f2 << " * \\note The \\c c_str_data_a() and \\c c_str_len_a() string access shims are applied to the format and to each parameter, to form a string slice" << ENDL - f2 << " */" << ENDL - - f2 << "template 0 - targs = "" - (0 ... param).each { |n| targs = targs + ", typename A#{n}" } - f2 << targs << "\n" - end - f2 << ">" << "\n" - f2 << "inline S& fmtln(S& sink, F const& format" << "\n" - args = "" - (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } - f2 << args << ")" << "\n" - f2 << "{" << "\n" - f2 << " FASTFORMAT_DECLARE_filter_type_();" << "\n" - f2 << " FASTFORMAT_DECLARE_c_str_datalen_PAIR_();" << "\n" - f2 << "" << "\n" - f2 << " const size_t cchFormat = FASTFORMAT_INVOKE_c_str_len_(format);" << "\n" - f2 << "#ifdef FASTFORMAT_NO_USE_JIT_CACHE" << "\n" - f2 << " defs::format_elements_t formatElements((1 + cchFormat) / 2);" << "\n" - f2 << " size_t numFormatElements;" << "\n" - f2 << " size_t numResultElements;" << "\n" - f2 << " unsigned n = fastformat_parseFormat(FASTFORMAT_INVOKE_c_str_data_(format), cchFormat, &formatElements[0], formatElements.size(), NULL, NULL);" << "\n" - f2 << " numFormatElements = n & 0xffff;" << "\n" - f2 << " numResultElements = n >> 16;" << "\n" - f2 << " ff_format_element_t *elements = &formatElements[0];" << "\n" - f2 << "" << "\n" - f2 << " FASTFORMAT_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API(numFormatElements <= formatElements.size(), \"number of format elements cannot exceed available capacity\");" << "\n" - f2 << "#else /* ? FASTFORMAT_NO_USE_JIT_CACHE */" << "\n" - f2 << " ff_format_element_t const *elements;" << "\n" - f2 << " size_t numFormatElements;" << "\n" - f2 << " size_t numResultElements;" << "\n" - f2 << " unsigned n = fastformat_lookupPattern(FASTFORMAT_INVOKE_c_str_data_(format), cchFormat, &elements);" << "\n" - f2 << " numFormatElements = n & 0xffff;" << "\n" - f2 << " numResultElements = n >> 16;" << "\n" - f2 << "#endif /* FASTFORMAT_NO_USE_JIT_CACHE */" << "\n" - f2 << "" << "\n" - if param < 2 - f2 << " // This needs to be a function call - RVL!" << "\n" - end - if 0 == param - f2 << " return FASTFORMAT_QUALIFY_HELPER_(fmt_outer_helper_#{param})(sink, flags::ff_newLine, elements, numFormatElements, numResultElements);" << "\n" - else - f2 << " return FASTFORMAT_QUALIFY_HELPER_(fmt_outer_helper_#{param})(sink, flags::ff_newLine, elements, numFormatElements, numResultElements" << "\n" - (1 ... param).each \ - { |n| - f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{n-1}, &arg#{n-1}, static_cast(0))" << "\n" - } - f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{param-1}, &arg#{param-1}, static_cast(0)));" << "\n" - end - - f2 << "}" << "\n" - f2 << "" << "\n" - end - - - # write() - - f2 << "/** Writes #{param} object#{plural} of arbitrary type to the given sink" << ENDL - f2 << " * \\ingroup group__interface_functions__api_write" << ENDL - f2 << " * \\param sink The sink to receive the formatted result" << ENDL - (0 ... param).each { |n| f2 << " * \\param arg#{n} parameter #{n}" << ENDL } - f2 << " * \\note The \\c c_str_data_a() and \\c c_str_len_a() string access shims are applied to each parameter, to form a string slice" << ENDL - f2 << " */" << ENDL - - if param == 0 - f2 << "template " << "\n" - else - f2 << "template 0 - targs = "" - (0 ... param).each { |n| targs = targs + ", typename A#{n}" } - f2 << targs << "\n" - f2 << ">" << "\n" - end - if 0 == param - f2 << "inline S& write(S& sink)" << "\n" - else - f2 << "inline S& write(S& sink" << "\n" - args = "" - (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } - f2 << args << ")" << "\n" - end - f2 << "{" << "\n" - if param > 0 - f2 << " FASTFORMAT_DECLARE_filter_type_();" << "\n" - f2 << "" << "\n" - end - if param > 1 and param < 5 - f2 << " // This needs to be a function call - RVL!" << "\n" - end - if 0 == param - f2 << " return FASTFORMAT_QUALIFY_HELPER_(write_outer_helper_#{param})(sink, 0);" << "\n" - else - f2 << " return FASTFORMAT_QUALIFY_HELPER_(write_outer_helper_#{param})(sink, 0" << "\n" - (1 ... param).each \ - { |n| - f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{n-1}, &arg#{n-1}, static_cast(0))" << "\n" - } - f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{param-1}, &arg#{param-1}, static_cast(0)));" << "\n" - end - - f2 << "}" << "\n" - f2 << "" << "\n" - - - # writeln() - - f2 << "/** Writes #{param} object#{plural} of arbitrary type to the given sink, appending a newline" << ENDL - f2 << " * \\ingroup group__interface_functions__api_write" << ENDL - f2 << " * \\param sink The sink to receive the formatted result" << ENDL - (0 ... param).each { |n| f2 << " * \\param arg#{n} parameter #{n}" << ENDL } - f2 << " * \\note The \\c c_str_data_a() and \\c c_str_len_a() string access shims are applied to each parameter, to form a string slice" << ENDL - f2 << " */" << ENDL - - if param == 0 - f2 << "template " << "\n" - else - f2 << "template 0 - targs = "" - (0 ... param).each { |n| targs = targs + ", typename A#{n}" } - f2 << targs << "\n" - f2 << ">" << "\n" - end - if 0 == param - f2 << "inline S& writeln(S& sink)" << "\n" - else - f2 << "inline S& writeln(S& sink" << "\n" - args = "" - (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } - f2 << args << ")" << "\n" - end - f2 << "{" << "\n" - if param > 0 - f2 << " FASTFORMAT_DECLARE_filter_type_();" << "\n" - f2 << "" << "\n" - end - if param > 1 and param < 5 - f2 << " // This needs to be a function call - RVL!" << "\n" - end - if 0 == param - f2 << " return FASTFORMAT_QUALIFY_HELPER_(write_outer_helper_#{param})(sink, flags::ff_newLine);" << "\n" - else - f2 << " return FASTFORMAT_QUALIFY_HELPER_(write_outer_helper_#{param})(sink, flags::ff_newLine" << "\n" - (1 ... param).each \ - { |n| - f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{n-1}, &arg#{n-1}, static_cast(0))" << "\n" - } - f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{param-1}, &arg#{param-1}, static_cast(0)));" << "\n" - end - - f2 << "}" << "\n" - f2 << "" << "\n" + plural = (1 == param) ? "" : "s" + + # fmt() + + if param > 0 + f2 << "/** Formats #{param} object#{plural} of arbitrary type to the given sink" << ENDL + f2 << " * \\ingroup group__interface_functions__api_format" << ENDL + f2 << " * \\param sink The sink to receive the formatted result" << ENDL + f2 << " * \\param format The format string that defines the formatted result" << ENDL + (0 ... param).each { |n| f2 << " * \\param arg#{n} parameter #{n}" << ENDL } + f2 << " * \\note The \\c c_str_data_a() and \\c c_str_len_a() string access shims are applied to the format and to each parameter, to form a string slice" << ENDL + f2 << " */" << ENDL + + f2 << "template 0 + targs = "" + (0 ... param).each { |n| targs = targs + ", typename A#{n}" } + f2 << targs << "\n" + end + f2 << ">" << "\n" + f2 << "inline S& fmt(S& sink, F const& format" << "\n" + args = "" + (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } + f2 << args << ")" << "\n" + f2 << "{" << "\n" + f2 << " FASTFORMAT_DECLARE_filter_type_();" << "\n" + f2 << " FASTFORMAT_DECLARE_c_str_datalen_PAIR_();" << "\n" + f2 << "" << "\n" + f2 << " const size_t cchFormat = FASTFORMAT_INVOKE_c_str_len_(format);" << "\n" + f2 << "#ifdef FASTFORMAT_NO_USE_JIT_CACHE" << "\n" + f2 << " defs::format_elements_t formatElements((1 + cchFormat) / 2);" << "\n" + f2 << " size_t numFormatElements;" << "\n" + f2 << " size_t numResultElements;" << "\n" + f2 << " unsigned n = fastformat_parseFormat(FASTFORMAT_INVOKE_c_str_data_(format), cchFormat, &formatElements[0], formatElements.size(), NULL, NULL);" << "\n" + f2 << " numFormatElements = n & 0xffff;" << "\n" + f2 << " numResultElements = n >> 16;" << "\n" + f2 << " ff_format_element_t *elements = &formatElements[0];" << "\n" + f2 << "" << "\n" + f2 << " FASTFORMAT_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API(numFormatElements <= formatElements.size(), \"number of pattern elements cannot exceed available capacity\");" << "\n" + f2 << "#else /* ? FASTFORMAT_NO_USE_JIT_CACHE */" << "\n" + f2 << " ff_format_element_t const *elements;" << "\n" + f2 << " size_t numFormatElements;" << "\n" + f2 << " size_t numResultElements;" << "\n" + f2 << " unsigned n = fastformat_lookupPattern(FASTFORMAT_INVOKE_c_str_data_(format), cchFormat, &elements);" << "\n" + f2 << " numFormatElements = n & 0xffff;" << "\n" + f2 << " numResultElements = n >> 16;" << "\n" + f2 << "#endif /* FASTFORMAT_NO_USE_JIT_CACHE */" << "\n" + f2 << "" << "\n" + if param < 2 + f2 << " // This needs to be a function call - RVL!" << "\n" + end + if 0 == param + f2 << " return FASTFORMAT_QUALIFY_HELPER_(fmt_outer_helper_#{param})(sink, 0, elements, numFormatElements, numResultElements);" << "\n" + else + f2 << " return FASTFORMAT_QUALIFY_HELPER_(fmt_outer_helper_#{param})(sink, 0, elements, numFormatElements, numResultElements" << "\n" + (1 ... param).each \ + { |n| + f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{n-1}, &arg#{n-1}, static_cast(0))" << "\n" + } + f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{param-1}, &arg#{param-1}, static_cast(0)));" << "\n" + end + + f2 << "}" << "\n" + f2 << "" << "\n" + + # fmtln() + + f2 << "/** Formats #{param} object#{plural} of arbitrary type to the given sink, appending a newline" << ENDL + f2 << " * \\ingroup group__interface_functions__api_format" << ENDL + f2 << " * \\param sink The sink to receive the formatted result" << ENDL + f2 << " * \\param format The format string that defines the formatted result" << ENDL + (0 ... param).each { |n| f2 << " * \\param arg#{n} parameter #{n}" << ENDL } + f2 << " * \\note The \\c c_str_data_a() and \\c c_str_len_a() string access shims are applied to the format and to each parameter, to form a string slice" << ENDL + f2 << " */" << ENDL + + f2 << "template 0 + targs = "" + (0 ... param).each { |n| targs = targs + ", typename A#{n}" } + f2 << targs << "\n" + end + f2 << ">" << "\n" + f2 << "inline S& fmtln(S& sink, F const& format" << "\n" + args = "" + (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } + f2 << args << ")" << "\n" + f2 << "{" << "\n" + f2 << " FASTFORMAT_DECLARE_filter_type_();" << "\n" + f2 << " FASTFORMAT_DECLARE_c_str_datalen_PAIR_();" << "\n" + f2 << "" << "\n" + f2 << " const size_t cchFormat = FASTFORMAT_INVOKE_c_str_len_(format);" << "\n" + f2 << "#ifdef FASTFORMAT_NO_USE_JIT_CACHE" << "\n" + f2 << " defs::format_elements_t formatElements((1 + cchFormat) / 2);" << "\n" + f2 << " size_t numFormatElements;" << "\n" + f2 << " size_t numResultElements;" << "\n" + f2 << " unsigned n = fastformat_parseFormat(FASTFORMAT_INVOKE_c_str_data_(format), cchFormat, &formatElements[0], formatElements.size(), NULL, NULL);" << "\n" + f2 << " numFormatElements = n & 0xffff;" << "\n" + f2 << " numResultElements = n >> 16;" << "\n" + f2 << " ff_format_element_t *elements = &formatElements[0];" << "\n" + f2 << "" << "\n" + f2 << " FASTFORMAT_CONTRACT_ENFORCE_POSTCONDITION_RETURN_API(numFormatElements <= formatElements.size(), \"number of format elements cannot exceed available capacity\");" << "\n" + f2 << "#else /* ? FASTFORMAT_NO_USE_JIT_CACHE */" << "\n" + f2 << " ff_format_element_t const *elements;" << "\n" + f2 << " size_t numFormatElements;" << "\n" + f2 << " size_t numResultElements;" << "\n" + f2 << " unsigned n = fastformat_lookupPattern(FASTFORMAT_INVOKE_c_str_data_(format), cchFormat, &elements);" << "\n" + f2 << " numFormatElements = n & 0xffff;" << "\n" + f2 << " numResultElements = n >> 16;" << "\n" + f2 << "#endif /* FASTFORMAT_NO_USE_JIT_CACHE */" << "\n" + f2 << "" << "\n" + if param < 2 + f2 << " // This needs to be a function call - RVL!" << "\n" + end + if 0 == param + f2 << " return FASTFORMAT_QUALIFY_HELPER_(fmt_outer_helper_#{param})(sink, flags::ff_newLine, elements, numFormatElements, numResultElements);" << "\n" + else + f2 << " return FASTFORMAT_QUALIFY_HELPER_(fmt_outer_helper_#{param})(sink, flags::ff_newLine, elements, numFormatElements, numResultElements" << "\n" + (1 ... param).each \ + { |n| + f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{n-1}, &arg#{n-1}, static_cast(0))" << "\n" + } + f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{param-1}, &arg#{param-1}, static_cast(0)));" << "\n" + end + + f2 << "}" << "\n" + f2 << "" << "\n" + end + + + # write() + + f2 << "/** Writes #{param} object#{plural} of arbitrary type to the given sink" << ENDL + f2 << " * \\ingroup group__interface_functions__api_write" << ENDL + f2 << " * \\param sink The sink to receive the formatted result" << ENDL + (0 ... param).each { |n| f2 << " * \\param arg#{n} parameter #{n}" << ENDL } + f2 << " * \\note The \\c c_str_data_a() and \\c c_str_len_a() string access shims are applied to each parameter, to form a string slice" << ENDL + f2 << " */" << ENDL + + if param == 0 + f2 << "template " << "\n" + else + f2 << "template 0 + targs = "" + (0 ... param).each { |n| targs = targs + ", typename A#{n}" } + f2 << targs << "\n" + f2 << ">" << "\n" + end + if 0 == param + f2 << "inline S& write(S& sink)" << "\n" + else + f2 << "inline S& write(S& sink" << "\n" + args = "" + (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } + f2 << args << ")" << "\n" + end + f2 << "{" << "\n" + if param > 0 + f2 << " FASTFORMAT_DECLARE_filter_type_();" << "\n" + f2 << "" << "\n" + end + if param > 1 and param < 5 + f2 << " // This needs to be a function call - RVL!" << "\n" + end + if 0 == param + f2 << " return FASTFORMAT_QUALIFY_HELPER_(write_outer_helper_#{param})(sink, 0);" << "\n" + else + f2 << " return FASTFORMAT_QUALIFY_HELPER_(write_outer_helper_#{param})(sink, 0" << "\n" + (1 ... param).each \ + { |n| + f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{n-1}, &arg#{n-1}, static_cast(0))" << "\n" + } + f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{param-1}, &arg#{param-1}, static_cast(0)));" << "\n" + end + + f2 << "}" << "\n" + f2 << "" << "\n" + + + # writeln() + + f2 << "/** Writes #{param} object#{plural} of arbitrary type to the given sink, appending a newline" << ENDL + f2 << " * \\ingroup group__interface_functions__api_write" << ENDL + f2 << " * \\param sink The sink to receive the formatted result" << ENDL + (0 ... param).each { |n| f2 << " * \\param arg#{n} parameter #{n}" << ENDL } + f2 << " * \\note The \\c c_str_data_a() and \\c c_str_len_a() string access shims are applied to each parameter, to form a string slice" << ENDL + f2 << " */" << ENDL + + if param == 0 + f2 << "template " << "\n" + else + f2 << "template 0 + targs = "" + (0 ... param).each { |n| targs = targs + ", typename A#{n}" } + f2 << targs << "\n" + f2 << ">" << "\n" + end + if 0 == param + f2 << "inline S& writeln(S& sink)" << "\n" + else + f2 << "inline S& writeln(S& sink" << "\n" + args = "" + (0 ... param).each { |n| args = args + ", A#{n} const& arg#{n}" } + f2 << args << ")" << "\n" + end + f2 << "{" << "\n" + if param > 0 + f2 << " FASTFORMAT_DECLARE_filter_type_();" << "\n" + f2 << "" << "\n" + end + if param > 1 and param < 5 + f2 << " // This needs to be a function call - RVL!" << "\n" + end + if 0 == param + f2 << " return FASTFORMAT_QUALIFY_HELPER_(write_outer_helper_#{param})(sink, flags::ff_newLine);" << "\n" + else + f2 << " return FASTFORMAT_QUALIFY_HELPER_(write_outer_helper_#{param})(sink, flags::ff_newLine" << "\n" + (1 ... param).each \ + { |n| + f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{n-1}, &arg#{n-1}, static_cast(0))" << "\n" + } + f2 << " , FASTFORMAT_INVOKE_filter_type_(arg#{param-1}, &arg#{param-1}, static_cast(0)));" << "\n" + end + + f2 << "}" << "\n" + f2 << "" << "\n" } f2.close() From b00c112f96b6ad39c7284ca3b7e71ec73b625c2c Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Thu, 17 Sep 2026 09:34:23 +1000 Subject: [PATCH 03/17] chore(c-cpp): union files.associations from ~/dev vscode settings Give the 28 in-wave C/C++ projects (and gold **c** / **cxx** / **c_cxx** templates) a sorted **files.associations** union of all associations found under **~/dev**; --- .editorconfig | 50 ++++++++++ .vscode/settings.json | 220 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 267 insertions(+), 3 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..6653127 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,50 @@ +root = true + +# Language indent/EOL/charset overlap with .vscode/settings.json. +# Rulers, renderWhitespace, detectIndentation, mergeEditor, and +# language-server settings cannot be expressed here — they stay in +# settings.json. + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = tab +insert_final_newline = true +trim_trailing_whitespace = true + +# [bat] +[*.{bat,cmd}] +end_of_line = crlf +indent_size = 4 +indent_style = space + +# [cmake] +[{CMakeLists.txt,*.cmake}] +indent_size = 4 +indent_style = tab + +# [cpp] +[*.{cpp,cxx,hpp,hxx}] +indent_size = 4 +indent_style = space + +# [json] +[*.json] +indent_size = 2 +indent_style = space + +# [markdown] +[*.md] +indent_size = 2 +indent_style = space + +# [shellscript] +[*.{bash,sh,zsh}] +indent_size = 2 +indent_style = space + +# [yaml] +[*.{yaml,yml}] +indent_size = 2 +indent_style = space diff --git a/.vscode/settings.json b/.vscode/settings.json index f381e9e..6a0da10 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,219 @@ { - "editor.detectIndentation": false, - "editor.insertSpaces": true, - "editor.tabSize": 4, + "[bat]": { + "editor.insertSpaces": true, + "editor.rulers": [ 60, 76 ], + "editor.tabSize": 4, + }, + "[c]": { + "editor.defaultFormatter": "ms-vscode.cpptools", + "editor.formatOnSave": true, + "editor.insertSpaces": true, + "editor.rulers": [ 60, 64, 68, 72, 76 ], + "editor.tabSize": 4, + }, + "[cmake]": { + "editor.insertSpaces": false, + "editor.tabSize": 4, + }, + "[cpp]": { + "editor.defaultFormatter": "ms-vscode.cpptools", + "editor.formatOnSave": true, + "editor.insertSpaces": true, + "editor.rulers": [ 60, 64, 68, 72, 76 ], + "editor.tabSize": 4, + }, + "[json]": { + "editor.insertSpaces": true, + "editor.tabSize": 2, + }, + "[markdown]": { + "editor.insertSpaces": true, + "editor.tabSize": 2, + }, + "[python]": { + "diffEditor.ignoreTrimWhitespace": false, + "editor.insertSpaces": true, + "editor.rulers": [ 51, 60, 61, 76 ], + "editor.tabSize": 4, + }, + "[ruby]": { + "editor.insertSpaces": true, + "editor.tabSize": 2, + }, + "[shellscript]": { + "editor.insertSpaces": true, + "editor.rulers": [ 60, 76 ], + "editor.tabSize": 2, + }, + "[toml]": { + "editor.insertSpaces": false, + "editor.tabSize": 2, + }, + "[yaml]": { + "editor.insertSpaces": true, + "editor.tabSize": 2, + }, + "C_Cpp.autocompleteAddParentheses": true, + "C_Cpp.clang_format_fallbackStyle": "none", + "C_Cpp.clang_format_style": "file", + "C_Cpp.default.cStandard": "c17", + "C_Cpp.default.cppStandard": "c++17", + "C_Cpp.enhancedColorization": "enabled", + "C_Cpp.errorSquiggles": "enabled", + "C_Cpp.formatting": "clangFormat", + "C_Cpp.intelliSenseEngine": "default", + "cmake.configureOnOpen": false, + "debug.allowBreakpointsEverywhere": true, + "editor.detectIndentation": false, + "editor.insertSpaces": false, + "editor.renderWhitespace": "all", + "editor.rulers": [ 76 ], + "editor.tabSize": 2, + "files.associations": { + "*.gemspec": "ruby", + "*.mdoc": "troff", + "*.roff": "troff", + "Gemfile": "ruby", + "Rakefile": "ruby", + "__bit_reference": "cpp", + "__bits": "cpp", + "__config": "cpp", + "__debug": "cpp", + "__errc": "cpp", + "__functional_03": "cpp", + "__functional_base": "cpp", + "__hash_table": "cpp", + "__locale": "cpp", + "__memory": "cpp", + "__mutex_base": "cpp", + "__node_handle": "cpp", + "__nullptr": "cpp", + "__split_buffer": "cpp", + "__string": "cpp", + "__threading_support": "cpp", + "__tree": "cpp", + "__tuple": "cpp", + "__verbose_abort": "cpp", + "algorithm": "cpp", + "api.h": "c", + "array": "cpp", + "atomic": "cpp", + "auto_buffer.h": "c", + "bit": "cpp", + "bitset": "cpp", + "cctype": "cpp", + "charconv": "cpp", + "chrono": "cpp", + "clasp.h": "c", + "cli_helpers.h": "c", + "clocale": "cpp", + "cmath": "cpp", + "compare": "cpp", + "complex": "cpp", + "concepts": "cpp", + "console_functions.h": "c", + "corecrt.h": "c", + "crtdefs.h": "c", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "exception": "cpp", + "execution": "cpp", + "fcntl.h": "c", + "format": "cpp", + "forward_list": "cpp", + "functional": "cpp", + "implicit_link.h": "c", + "initializer_list": "cpp", + "invoke.h": "c", + "io.h": "c", + "iomanip": "cpp", + "ios": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "iterator": "cpp", + "limits": "cpp", + "list": "cpp", + "locale": "cpp", + "main.h": "c", + "map": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "mutex": "cpp", + "net_helpers.h": "c", + "new": "cpp", + "numbers": "cpp", + "numeric": "cpp", + "optional": "cpp", + "ostream": "cpp", + "path_functions.h": "c", + "print": "cpp", + "queue": "cpp", + "random": "cpp", + "ranges": "cpp", + "ratio": "cpp", + "rc.h": "c", + "recls.h": "c", + "result_codes_.h": "c", + "semaphore": "cpp", + "set": "cpp", + "setenv.h": "c", + "shwild.h": "c", + "sleep_functions.h": "c", + "span": "cpp", + "sstream": "cpp", + "stack": "cpp", + "stdatomic.h": "c", + "stdbool.h": "c", + "stdexcept": "cpp", + "stdio.h": "c", + "stock.h": "c", + "stop_token": "cpp", + "streambuf": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "terse-api.h": "c", + "text_encoding": "cpp", + "thread": "cpp", + "trace.h": "c", + "tuple": "cpp", + "type_traits": "cpp", + "typeinfo": "cpp", + "uio.h": "c", + "unixem.h": "c", + "unordered_map": "cpp", + "util.h": "c", + "utility": "cpp", + "variant": "cpp", + "vector": "cpp", + "williamscrc.h": "c", + "xfacet": "cpp", + "xhash": "cpp", + "xiosbase": "cpp", + "xlocale": "cpp", + "xlocbuf": "cpp", + "xlocinfo": "cpp", + "xlocmes": "cpp", + "xlocmon": "cpp", + "xlocnum": "cpp", + "xloctime": "cpp", + "xmemory": "cpp", + "xstring": "cpp", + "xtests.internal.string.c": "cpp", + "xtr1common": "cpp", + "xtree": "cpp", + "xutility": "cpp", + }, + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "git.mergeEditor": false, } From 1b8ed75901ef04f9b2222cb83422162677cb2e17 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Thu, 17 Sep 2026 10:13:30 +1000 Subject: [PATCH 04/17] .gitattributes --- .gitattributes | 104 +++++++++++++++++++++++-- .gitignore | 208 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 259 insertions(+), 53 deletions(-) diff --git a/.gitattributes b/.gitattributes index 1f01d95..76a2f86 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,99 @@ -*.c linguist-language=C -*.h linguist-language=C -*.cpp linguist-language=C++ -*.hpp linguist-language=C++ -*.html linguist-detectable=false -makefile linguist-detectable=false +# .gitattributes — C / C++ (GitHub-hosted) +# +# Sources: GitHub Docs (line endings), git-scm gitattributes (diff=cpp), +# gitattributes/gitattributes C++.gitattributes + Common.gitattributes, +# github-linguist overrides. +# Default: detect text, normalize to LF in the repository +* text=auto + +# --- Source --- +*.c text diff=cpp +*.c++ text diff=cpp +*.cc text diff=cpp +*.cpp text diff=cpp +*.cxx text diff=cpp +*.h text diff=cpp +*.h++ text diff=cpp +*.hh text diff=cpp +*.hpp text diff=cpp +*.hxx text diff=cpp +*.inc text +*.inl text +*.ipp text +*.tcc text +*.tpp text + +# --- Build / config --- +*.am text +*.cmake text +*.m4 text +*.mak text +*.mk text +*akefile text +CMakeLists.txt text +configure text eol=lf +configure.ac text + +# --- Scripts --- +*.bash text eol=lf +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf +*.sh text eol=lf +*.zsh text eol=lf + +# --- Docs / meta --- +*.adoc text +*.markdown text diff=markdown +*.md text diff=markdown +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +LICENSE text +NEWS text +README text +TODO text +.gitattributes text +.gitignore text + +# --- Serialisation --- +*.json text +*.toml text +*.xml text +*.yaml text +*.yml text + +# --- Compiled / binary artefacts --- +*.a binary +*.dll binary +*.dylib binary +*.exe binary +*.gch binary +*.la binary +*.lai binary +*.lib binary +*.lo binary +*.o binary +*.obj binary +*.out binary +*.pch binary +*.slo binary +*.so binary + +# --- Archives / images (common) --- +*.gif binary +*.gz binary +*.ico binary +*.jpeg binary +*.jpg binary +*.png binary +*.tar binary +*.zip binary + +# --- GitHub Linguist --- +**/build/** linguist-generated +**/cmake-build-*/** linguist-generated diff --git a/.gitignore b/.gitignore index 38d94dd..226c160 100644 --- a/.gitignore +++ b/.gitignore @@ -1,80 +1,160 @@ +# Synesis Information Systems .gitignore for C / C++ libraries -# directories (by name) - -/_build/ - -include/b64/ -include/shwild/ -include/xcontract/ -include/xcover/ -include/xtests/ -src/b64/ -src/shwild/ -src/xcontract/ -src/xcover/ -src/xtests/ - -vc71/ -vc8/ -vc9/ +# directories (by name) bin/ - -lib/ - ideas/ - -bin/ - +ipch/ lib/ +scripts/internal/ +Win32/ +x64/ -ideas/ +.idea/ +.svn/ +.vs/ -Debug/ -Debug Multithreaded/ +__pycache__/ + +/_analyses/ +/_build-ci/ +/_build/ +/_internal/ + +/docs/ +/dox/ +/ideas/ +/include/xcontract/ +/include/xcover/ +/included/ +/node_modules/ +/releases/ +/scratch/ +/src/xcontract/ +/src/xcover/ +/target/ +/temp/ + +/examples/bin/ +/examples/c/bin/ +/examples/c/lib/ +/examples/cpp/bin/ +/examples/cpp/lib/ +/examples/lib/ + +Debug Multithreaded Dll/ Debug Multithreaded DLL/ -Unicode Debug/ -Unicode Debug Multithreaded/ -Unicode Debug Multithreaded DLL/ -Release/ -Release Multithreaded/ +Debug Multithreaded pseudoUnix/ +Debug Multithreaded pseudoUNIX/ +Debug Multithreaded/ +Debug/ +DebugDll/ +DebugDLL/ +DebugDLLUNIX/ +DebugMt/ +DebugMTDll/ +DebugMTDLL/ +DebugMTUnix/ +DebugNox/ +DebugUnix/ +DebugUNIX/ +Release Multithreaded Dll/ Release Multithreaded DLL/ -Unicode Release/ -Unicode Release Multithreaded/ +Release Multithreaded pseudoUnix/ +Release Multithreaded pseudoUNIX/ +Release Multithreaded/ +Release/ +ReleaseDll/ +ReleaseDLL/ +ReleaseDLLUNIX/ +ReleaseMt/ +ReleaseMTDll/ +ReleaseMTDLL/ +ReleaseMTUnix/ +ReleaseNox/ +ReleaseUnix/ +UDebug/ +UDebugMt/ +Unicode Debug Multithreaded Dll/ +Unicode Debug Multithreaded DLL/ +Unicode Debug Multithreaded/ +Unicode Debug/ +Unicode Release Multithreaded Dll/ Unicode Release Multithreaded DLL/ +Unicode Release Multithreaded/ +Unicode Release/ +URelease/ +UReleaseMt/ + # directories (by pattern) +/include-*/ + + # files (by name) -bzr-branching-notes.txt -handler-design-notes.txt +.DS_Store -.bzrignore +.classpath +.env.development.local +.env.local +.env.production.local +.env.test.local +.ruby-version +.svnignore +.svnignore-at-root .update_deps -list_changes.cmd -prepare.cmd -update +build/CMakeCache.txt build/makefile.tmpl build/makefile.tools.xml - -include/fastformat/internal/dos2unix.has.been.performed - +build/shwild.tmplgen +include/pantheios/internal/dos2unix.has.been.performed +include/stlsoft/dos2unix.has.been.performed +include/stlsoft/internal/dos2unix.has.been.performed +list_changes.cmd +logging-bailout.txt +prepare.cmd +sh.exe.stackdump +test/testpatterns.orj test/tests-plan.txt +tidydir.cmd +update_deps.cmd + # files (by pattern) *~ +*.*~ +*.???_obj *.a *.app +*.aps +*.b64 +*.bak +*.chm +*.class +*.csproj*user +*.d +*.diff *.dll +*.dsp *.dylib *.exe *.gch +*.gem +*.idb *.ilk +*.iobj +*.ipch +*.ipdb +*.la +*.lai *.lib +*.lo +*.log *.ncb *.o *.obj @@ -84,17 +164,51 @@ test/tests-plan.txt *.out *.pch *.pdb -*.sdf +*.pyc +*.rar +*.res *.sbr *.scc +*.sdf +*.slo *.so *.suo +*.sw[ponm] *.swp -*.vcproj*.user -*.vcxproj*.user +*.test +*.tlog +*.tmp +*.unsuccessfulbuild +*.VC.db +*.VC.opendb +*.xcuserstate +*.zip + +/build/*.tmpl +/build/*.tmplgen +/build/*.tools.xml +/build/*.zip +/build/ar* +/build/bc5* +/build/como* +/build/cw* +/build/gcc3* +/build/gcc4* +/build/icl* +/build/vc5* + +RCa0* +RCb0* + +npm-debug.log* +yarn-debug.log* +yarn-error.log* *.vc71.sln *.vc8.sln *.vc9.sln - +*.vcproj*.user +*.vcproj*user +*.vcxproj*.user +*.vcxproj*user From c5bb888eb0b11f7b08c479db6e2b45e1d20420d0 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Thu, 17 Sep 2026 10:17:30 +1000 Subject: [PATCH 05/17] .vscode/settings.json --- .vscode/settings.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 6a0da10..6aa78f6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,7 +8,7 @@ "editor.defaultFormatter": "ms-vscode.cpptools", "editor.formatOnSave": true, "editor.insertSpaces": true, - "editor.rulers": [ 60, 64, 68, 72, 76 ], + "editor.rulers": [ 60, 64, 68, 72, 76, 120 ], "editor.tabSize": 4, }, "[cmake]": { @@ -19,7 +19,7 @@ "editor.defaultFormatter": "ms-vscode.cpptools", "editor.formatOnSave": true, "editor.insertSpaces": true, - "editor.rulers": [ 60, 64, 68, 72, 76 ], + "editor.rulers": [ 60, 64, 68, 72, 76, 120 ], "editor.tabSize": 4, }, "[json]": { @@ -38,6 +38,7 @@ }, "[ruby]": { "editor.insertSpaces": true, + "editor.rulers": [ 60, 76 ], "editor.tabSize": 2, }, "[shellscript]": { From f15ff454c0e5c5e3608fed1068a667949d837e8e Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Thu, 17 Sep 2026 10:18:51 +1000 Subject: [PATCH 06/17] .vimrc --- .vimrc | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .vimrc diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..cebe6af --- /dev/null +++ b/.vimrc @@ -0,0 +1,70 @@ +" Synesis C/C++ project .vimrc — aligned with .sis/.vscode/c_cxx/settings.json + +set nocompatible +filetype indent plugin on +syntax enable +set autoindent +set backspace=indent,eol,start +set hlsearch +set incsearch +set number + +" files.insertFinalNewline +set eol +set fixeol + +" editor.renderWhitespace: all +set list +set listchars=tab:->,trail:-,extends:>,precedes:<,nbsp:+ + +" editor.detectIndentation: false — global defaults (editor.tabSize: 4, insertSpaces: true) +set colorcolumn=76 +set expandtab +set shiftwidth=4 +set softtabstop=4 +set tabstop=4 + +" colorcolumn draws a full-column tint in Vim (not a VS Code-style 1px line). +" Keep it subtle via the ColorColumn highlight group; reapply after colorscheme changes. +if has('termguicolors') + " set termguicolors +endif + +function! s:ConfigureColorColumn() abort + highlight ColorColumn ctermbg=236 guibg=#2a2a2a cterm=NONE gui=NONE +endfunction + +call s:ConfigureColorColumn() +autocmd ColorScheme * call s:ConfigureColorColumn() + +" files.trimTrailingWhitespace +autocmd BufWritePre * %s/\s\+$//e + +augroup sis_c_cxx + autocmd! + " [bat] + autocmd FileType bat,dosbatch setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76 + + " [c] / [cpp] + autocmd FileType c,cpp setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,64,68,72,76 + + " [cmake] + autocmd FileType cmake setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 + + " [json] / [markdown] / [ruby] / [yaml] + autocmd FileType json,markdown,ruby,yaml setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 + + " [python] + autocmd FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76 + + " [rust] + autocmd FileType rs setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=76 + + " [shellscript] + autocmd FileType bash,sh,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76 + + " [toml] + autocmd FileType toml setlocal noexpandtab tabstop=2 shiftwidth=2 softtabstop=2 + +augroup END + From b697d17e6429afcdca7ac8d15375af81ea60e54f Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Thu, 17 Sep 2026 10:19:37 +1000 Subject: [PATCH 07/17] .sis --- .sis/project_name.txt | 1 + .sis/script_info_lines.txt | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 .sis/project_name.txt create mode 100644 .sis/script_info_lines.txt diff --git a/.sis/project_name.txt b/.sis/project_name.txt new file mode 100644 index 0000000..4ca9628 --- /dev/null +++ b/.sis/project_name.txt @@ -0,0 +1 @@ +FastFormat diff --git a/.sis/script_info_lines.txt b/.sis/script_info_lines.txt new file mode 100644 index 0000000..cedeb44 --- /dev/null +++ b/.sis/script_info_lines.txt @@ -0,0 +1,3 @@ +FastFormat is an extremely fast, 100% type-safe, infinitely-extensible, I18N/L10N-friendly C++ output/formatting library +Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems +Copyright (c) 2006-2019, Matthew Wilson and Synesis Software From 4547f3a0e25923187616251b89b11787a4067b6c Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Thu, 17 Sep 2026 11:14:08 +1000 Subject: [PATCH 08/17] chore(): use computed PREFIX_VER with documented PATCH Align library version macros to c-cpp-standards. Define MAJOR, MINOR, PATCH, and ALPHABETA; compute PREFIX_VER by shifts; keep REVISION as a skip-section alias of PATCH (target at column 60); retain named historical VER_* constants only for comparison and documentation. --- CMakeLists.txt | 6 +++--- include/fastformat/fastformat.h | 32 ++++++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index acba137..e382479 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ # Purpose: Top-level CMake lists file for FastFormat # # Created: 6th February 2024 -# Updated: 6th February 2024 +# Updated: 17th September 2026 # # ######################################################################## # @@ -46,8 +46,8 @@ string(REGEX MATCH "#${RX_WS}*define${RX_WS}+_?${RX_PROJ_TAG}_VER_MAJOR${RX_WS}+ set(_VERSION_MAJOR ${CMAKE_MATCH_1}) string(REGEX MATCH "#${RX_WS}*define${RX_WS}+_?${RX_PROJ_TAG}_VER_MINOR${RX_WS}+([0-9]+)" MINOR_DUMMY ${_header_file}) set(_VERSION_MINOR ${CMAKE_MATCH_1}) -string(REGEX MATCH "#${RX_WS}*define${RX_WS}+_?${RX_PROJ_TAG}_VER_REVISION${RX_WS}+([0-9]+)" PATCH_DUMMY ${_header_file}) -set(_VERSION_PATCH ${CMAKE_MATCH_1}) +string(REGEX MATCH "#${RX_WS}*define${RX_WS}+_?${RX_PROJ_TAG}_VER_(PATCH|REVISION)${RX_WS}+([0-9]+)" PATCH_DUMMY ${_header_file}) +set(_VERSION_PATCH ${CMAKE_MATCH_2}) # set project version number here set(PROJECT_VERSION_MAJOR ${_VERSION_MAJOR}) diff --git a/include/fastformat/fastformat.h b/include/fastformat/fastformat.h index 0f9ac09..4b79840 100644 --- a/include/fastformat/fastformat.h +++ b/include/fastformat/fastformat.h @@ -4,11 +4,11 @@ * Purpose: FastFormat Core API. * * Created: 18th September 2006 - * Updated: 6th February 2024 + * Updated: 17th September 2026 * * Home: http://www.fastformat.org/ * - * Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems + * Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems * Copyright (c) 2006-2019, Matthew Wilson and Synesis Software * All rights reserved. * @@ -55,8 +55,8 @@ #ifndef FASTFORMAT_DOCUMENTATION_SKIP_SECTION # define FASTFORMAT_VER_FASTFORMAT_H_FASTFORMAT_MAJOR 1 # define FASTFORMAT_VER_FASTFORMAT_H_FASTFORMAT_MINOR 22 -# define FASTFORMAT_VER_FASTFORMAT_H_FASTFORMAT_REVISION 9 -# define FASTFORMAT_VER_FASTFORMAT_H_FASTFORMAT_EDIT 108 +# define FASTFORMAT_VER_FASTFORMAT_H_FASTFORMAT_REVISION 10 +# define FASTFORMAT_VER_FASTFORMAT_H_FASTFORMAT_EDIT 109 #endif /* !FASTFORMAT_DOCUMENTATION_SKIP_SECTION */ /** \def FASTFORMAT_VER_MAJOR @@ -67,8 +67,13 @@ * The minor version number of FastFormat */ -/** \def FASTFORMAT_VER_REVISION - * The revision version number of FastFormat +/** \def FASTFORMAT_VER_PATCH + * The patch version number of FastFormat + */ + +/** \def FASTFORMAT_VER_ALPHABETA + * The alpha/beta number of FastFormat, in the range 1-0xFE for + * prerelease versions, and 0xFF for a released version */ /** \def FASTFORMAT_VER @@ -103,9 +108,20 @@ #define FASTFORMAT_VER_MAJOR 0 #define FASTFORMAT_VER_MINOR 7 -#define FASTFORMAT_VER_REVISION 4 +#define FASTFORMAT_VER_PATCH 4 +#define FASTFORMAT_VER_ALPHABETA 0x86 + +#define FASTFORMAT_VER \ + (0\ + | ( FASTFORMAT_VER_MAJOR << 24 ) \ + | ( FASTFORMAT_VER_MINOR << 16 ) \ + | ( FASTFORMAT_VER_PATCH << 8 ) \ + | ( FASTFORMAT_VER_ALPHABETA << 0 ) \ + ) -#define FASTFORMAT_VER FASTFORMAT_VER_0_7_4_RC_6 +#ifndef FASTFORMAT_DOCUMENTATION_SKIP_SECTION +# define FASTFORMAT_VER_REVISION FASTFORMAT_VER_PATCH +#endif /* !FASTFORMAT_DOCUMENTATION_SKIP_SECTION */ /* ///////////////////////////////////////////////////////////////////////// * Includes - 1 From 63994454bb3b118300744442d533cf289bd5887e Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 18 Sep 2026 06:27:17 +1000 Subject: [PATCH 09/17] chore(fastformat): modernise CMake for C17/C++17 and OS flavour flags Align the top-level CMake layout with current Synesis boilerplate: - set CMP0177 when CMake >= 3.31; - default to C17/C++17, with MSVC < 1930 falling back to C90/C++98; - honour MSVC_USE_MT for the static runtime; - add LanguageFullVersion.cmake and a TargetMacros.cmake stub; - resolve STLSoft via -DSTLSOFT / $STLSOFT / find_package, raise xTests floor to 0.26, and optionally detect shwild; - discriminate targets with _BUILD_AS_UNIX / _BUILD_AS_WIN32; - install package config under CMAKE_INSTALL_LIBDIR; - emit a completion notice with language standards and build type; --- CMakeLists.txt | 225 +++++++++++++++++++++++++++----- cmake/LanguageFullVersion.cmake | 63 +++++++++ cmake/TargetMacros.cmake | 1 + examples/CMakeLists.txt | 16 +-- src/CMakeLists.txt | 8 +- test/CMakeLists.txt | 4 +- test/scratch/CMakeLists.txt | 8 +- test/unit/CMakeLists.txt | 12 +- 8 files changed, 280 insertions(+), 57 deletions(-) create mode 100644 cmake/LanguageFullVersion.cmake create mode 100644 cmake/TargetMacros.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index e382479..c590aac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,9 @@ # CMake cmake_minimum_required(VERSION 3.20 FATAL_ERROR) +if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.31") + cmake_policy(SET CMP0177 NEW) +endif() # require out-of-source builds file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt" LOC_PATH) @@ -55,84 +58,236 @@ set(PROJECT_VERSION_MINOR ${_VERSION_MINOR}) set(PROJECT_VERSION_PATCH ${_VERSION_PATCH}) set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") -message(NOTICE "Generating CMake build scripts for ${PROJECT_NAME} ${PROJECT_VERSION}") - - # adhere strictly to C and C++ standards plus extensions. These are actually # useless since we do not compile anything; they merely state our intention. -set(CMAKE_C_STANDARD 11) +set(CMAKE_C_STANDARD 17) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS ON) # GNU extensions and POSIX standard -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS ON) +if(MSVC) + + if(MSVC_VERSION LESS 1800) + + add_compile_options("/wd4996") + endif() + + if(MSVC_VERSION LESS 1930) + + set(CMAKE_C_STANDARD 90) + set(CMAKE_CXX_STANDARD 98) + endif() + + if(MSVC_USE_MT) + + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + endif(MSVC_USE_MT) +else(MSVC) + + if(MSVC_USE_MT) + + # this here just to absorb warning about not using `MSVC_USE_MT` (to + # enable **prepare_cmake.sh** to be simple) + endif(MSVC_USE_MT) +endif(MSVC) + # ########################################################## +# dependencies, features, includes, and options + + +# ################################################ +# includes - 1 + +include(BuildType) +include(LanguageFullVersion) +include(TargetMacros) + + +# ################################################ +# dependencies, features, and options + + +# ###################################### +# options + +option(BUILD_EXAMPLES "Build examples" ON) + +option(BUILD_TESTING "Build tests" ON) + +option(NO_CSTRING_CPP_API "Disable C++ API (and associated C++ examples/tests)" OFF) + + +# ###################################### +# features + + +# ###################################### # dependencies +# +# required (when BUILD_TESTING): +# - STLSoft - required for testing (also used by remaining C++ tests/examples); +# - xTests - required for testing; +# +# optional: +# - shwild - for enhanced match constructs in xTests (unless NO_SHWILD); +# ############################ +# STLSoft +# +# We provide flexibility here, as in: +# 1. if a CMake variable STLSOFT is provided then it is used; otherwise +# 2. if an environment variable STLSOFT is provided then it then it is used; +# otherwise +# 3. if the package STLSoft (via find_package()) is found then it is used; +# otherwise +# 4. we abort + if(BUILD_TESTING) - set(xTests_REQUIRED_VERSION_ 0.21.2) + if(DEFINED STLSOFT) - find_package(xTests ${xTests_REQUIRED_VERSION_} REQUIRED) + message("-- STLSOFT provided as CMake variable with value '${STLSOFT}'") - message("-- CMake package xTests found (version ${xTests_VERSION}; ${xTests_REQUIRED_VERSION_} requested)") + set(STLSOFT_INCLUDE_DIR ${STLSOFT}/include) + elseif(DEFINED ENV{STLSOFT}) + + message("-- STLSOFT provided as environment variable with value '$ENV{STLSOFT}'") + + set(STLSOFT_INCLUDE_DIR $ENV{STLSOFT}/include) + else() + + set(STLSoft_REQUIRED_VERSION_ 1.11) + find_package(STLSoft ${STLSoft_REQUIRED_VERSION_} REQUIRED) - set(STLSoft_REQUIRED_VERSION_ 0.10.8) + message("-- CMake package STLSoft found (version ${STLSoft_VERSION}; ${STLSoft_REQUIRED_VERSION_} requested)") + endif() - find_package(STLSoft ${STLSoft_REQUIRED_VERSION_} REQUIRED) + if(DEFINED STLSOFT_INCLUDE_DIR OR DEFINED STLSoft_FOUND) - message("-- CMake package STLSoft found (version ${STLSoft_VERSION}; ${STLSoft_REQUIRED_VERSION_} requested)") + include_directories(${STLSOFT_INCLUDE_DIR}) + + add_compile_definitions(HAS_STLSOFT) + add_compile_definitions(HAS_STLSoft) + endif() endif(BUILD_TESTING) +# ############################ +# shwild (optional) + +if(BUILD_TESTING) + + if(NOT (NO_SHWILD)) + + if(BUILD_TESTING) + + find_package(shwild QUIET) + + if(shwild_FOUND) + + message("-- CMake package shwild found (version ${shwild_VERSION})") + + add_compile_definitions(XTESTS_HAS_SHWILD) + endif(shwild_FOUND) + endif(BUILD_TESTING) + endif() +endif(BUILD_TESTING) -# ########################################################## -# install -# provides install directory variables as defined by the GNU Coding Standards. +# ############################ +# xTests + +if(BUILD_TESTING) + + set(xTests_REQUIRED_VERSION_ 0.26) + + find_package(xTests ${xTests_REQUIRED_VERSION_} REQUIRED) + + message("-- CMake package xTests found (version ${xTests_VERSION}; ${xTests_REQUIRED_VERSION_} requested)") +endif(BUILD_TESTING) + + +# ################################################ +# includes - 2 + +include(CMakePackageConfigHelpers) +if(BUILD_TESTING) + + include(CTest) +endif(BUILD_TESTING) include(GNUInstallDirs) # ########################################################## -# STLSoft +# targets +# ################################################ +# custom definitions -# ########################################################## -# build +if(UNIX) -# load/default `CMAKE_BUILD_TYPE` -include(BuildType) + set(_BUILD_AS_UNIX 1) -add_subdirectory(src) + message("-- Operating system Unix") +else(UNIX) + if(WIN32) -# ########################################################## -# test + if(USE_UNIXEM) -include(CTest) + set(_BUILD_AS_UNIX 1) -if(BUILD_TESTING) + message("-- Operating system Unix (synthesised on Windows)") + else(USE_UNIXEM) - message("-- enabled building of tests ...") + set(_BUILD_AS_WIN32 1) - add_subdirectory(test) -endif() + message("-- Operating system Windows") + endif(USE_UNIXEM) + else(WIN32) + message("-- Operating system unknown") + endif(WIN32) +endif(UNIX) -# ########################################################## + +# ################################################ +# main libraries + +add_subdirectory(src) + + +# ################################################ # examples -option(BUILD_EXAMPLES "Build examples" ON) if(BUILD_EXAMPLES) message("-- enabled building of examples ...") add_subdirectory(examples) -endif() +else(BUILD_EXAMPLES) + + message("-- disabled building of examples - define BUILD_EXAMPLES to enable") +endif(BUILD_EXAMPLES) + + +# ################################################ +# tests + +if(BUILD_TESTING) + + message("-- enabled building of tests ...") + + add_subdirectory(test) +else(BUILD_TESTING) + + message("-- disabled building of tests - define BUILD_TESTING to enable") +endif(BUILD_TESTING) # ########################################################## @@ -142,14 +297,12 @@ endif() # ########################################################## # export -include(CMakePackageConfigHelpers) - set(EXPORT_NAME ${PROJECT_NAME_LOWER}) configure_package_config_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${EXPORT_NAME}-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-config.cmake - INSTALL_DESTINATION ${LIB_INSTALL_DIR}/${EXPORT_NAME}/cmake + INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/${EXPORT_NAME}/cmake ) write_basic_package_version_file( @@ -176,5 +329,11 @@ install( FILES ) +# ########################################################## +# completion + +message(NOTICE "Generating CMake build scripts for ${PROJECT_NAME} ${PROJECT_VERSION}, for C${CMAKE_C_STANDARD} C++${CMAKE_CXX_STANDARD}, with build type ${CMAKE_BUILD_TYPE}") + + # ############################## end of file ############################# # diff --git a/cmake/LanguageFullVersion.cmake b/cmake/LanguageFullVersion.cmake new file mode 100644 index 0000000..c0882b4 --- /dev/null +++ b/cmake/LanguageFullVersion.cmake @@ -0,0 +1,63 @@ + +# ################################################ +# X_CMAKE_C_FULLSTANDARD + +set(X_CMAKE_C_FULLSTANDARD 0) + +if(FALSE) +elseif(CMAKE_C_STANDARD EQUAL 99) + + set(X_CMAKE_C_FULLSTANDARD 1999) +elseif(CMAKE_C_STANDARD EQUAL 90) + + set(X_CMAKE_C_FULLSTANDARD 1990) +elseif(CMAKE_C_STANDARD GREATER_EQUAL 23) + + set(X_CMAKE_C_FULLSTANDARD 2023) +elseif(CMAKE_C_STANDARD GREATER_EQUAL 17) + + set(X_CMAKE_C_FULLSTANDARD 2017) +elseif(CMAKE_C_STANDARD GREATER_EQUAL 11) + + set(X_CMAKE_C_FULLSTANDARD 2011) +else() + + message(FATAL_ERROR "mechanism for discriminating X_CMAKE_C_FULLSTANDARD has failed") +endif() + + +# ################################################ +# X_CMAKE_CXX_FULLSTANDARD + +set(X_CMAKE_CXX_FULLSTANDARD 0) + +if(FALSE) +elseif(CMAKE_CXX_STANDARD EQUAL 98) + + set(X_CMAKE_CXX_FULLSTANDARD 1998) +elseif(CMAKE_CXX_STANDARD GREATER_EQUAL 26) + + set(X_CMAKE_CXX_FULLSTANDARD 2026) +elseif(CMAKE_CXX_STANDARD GREATER_EQUAL 23) + + set(X_CMAKE_CXX_FULLSTANDARD 2023) +elseif(CMAKE_CXX_STANDARD GREATER_EQUAL 20) + + set(X_CMAKE_CXX_FULLSTANDARD 2020) +elseif(CMAKE_CXX_STANDARD GREATER_EQUAL 17) + + set(X_CMAKE_CXX_FULLSTANDARD 2017) +elseif(CMAKE_CXX_STANDARD GREATER_EQUAL 14) + + set(X_CMAKE_CXX_FULLSTANDARD 2014) +elseif(CMAKE_CXX_STANDARD GREATER_EQUAL 11) + + set(X_CMAKE_CXX_FULLSTANDARD 2011) +else() + + message(FATAL_ERROR "mechanism for discriminating X_CMAKE_CXX_FULLSTANDARD has failed") +endif() + + +# ############################## end of file ############################# # + diff --git a/cmake/TargetMacros.cmake b/cmake/TargetMacros.cmake new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/cmake/TargetMacros.cmake @@ -0,0 +1 @@ + diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index a06cc91..936f87b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -9,16 +9,16 @@ if (APPLE) endif() -if(UNIX) +if(_BUILD_AS_UNIX) add_definitions(-DUNIX) add_definitions(-Dunix) -endif(UNIX) +endif(_BUILD_AS_UNIX) -if(WIN32) +if(_BUILD_AS_WIN32) message(FATAL_ERROR "Use of CMake on Windows not currently supported") -endif(WIN32) +endif(_BUILD_AS_WIN32) add_subdirectory(example.arguments.boolean) @@ -30,10 +30,10 @@ add_subdirectory(example.ff_101.no_namespace) add_subdirectory(example.flush) add_subdirectory(example.inserter.hex) add_subdirectory(example.inserter.integers) -if(WIN32) +if(_BUILD_AS_WIN32) add_subdirectory(example.inserter.integers.WindowsLargeIntegers) -endif(WIN32) +endif(_BUILD_AS_WIN32) add_subdirectory(example.inserter.reals) add_subdirectory(example.iterators.format_iterator) #[====[ @@ -49,10 +49,10 @@ add_subdirectory(example.overload.3.server_log) #]====] add_subdirectory(example.overload.3.tabulations) add_subdirectory(example.pad.hash) -if(WIN32) +if(_BUILD_AS_WIN32) add_subdirectory(example.sink.OutputDebugString) -endif(WIN32) +endif(_BUILD_AS_WIN32) add_subdirectory(example.sink.c_string) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b8db99f..9f40513 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,16 +21,16 @@ if (APPLE) include_directories("/usr/local/include") endif() -if(UNIX) +if(_BUILD_AS_UNIX) add_definitions(-DUNIX) add_definitions(-Dunix) -endif(UNIX) +endif(_BUILD_AS_UNIX) -if(WIN32) +if(_BUILD_AS_WIN32) message(FATAL_ERROR "Use of CMake on Windows not currently supported") -endif(WIN32) +endif(_BUILD_AS_WIN32) # specify the primary public headers for the library, which controls whether diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d28be8f..8902a43 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -9,11 +9,11 @@ if (APPLE) endif() -if(UNIX) +if(_BUILD_AS_UNIX) add_definitions(-DUNIX) add_definitions(-Dunix) -endif(UNIX) +endif(_BUILD_AS_UNIX) if(WIN32) diff --git a/test/scratch/CMakeLists.txt b/test/scratch/CMakeLists.txt index ededcd5..a533300 100644 --- a/test/scratch/CMakeLists.txt +++ b/test/scratch/CMakeLists.txt @@ -16,21 +16,21 @@ add_subdirectory(test.scratch.implicit_integer) #]====] add_subdirectory(test.scratch.inserter.integer) add_subdirectory(test.scratch.inserter.real) -if(WIN32) +if(_BUILD_AS_WIN32) add_subdirectory(test.scratch.overload.3.BSTR_out_parameter) add_subdirectory(test.scratch.sink.WindowsConsole) add_subdirectory(test.scratch.sink.WindowsMessageBox) -endif(WIN32) +endif(_BUILD_AS_WIN32) add_subdirectory(test.scratch.sink.auto_buffer) #[====[ add_subdirectory(test.scratch.sink.vectored_file) #]====] add_subdirectory(test.scratch.sinks.shim_string) -if(WIN32) +if(_BUILD_AS_WIN32) add_subdirectory(test.scratch.speech) -endif(WIN32) +endif(_BUILD_AS_WIN32) # ############################## end of file ############################# # diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index c6592f8..d6bfe49 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -8,10 +8,10 @@ add_subdirectory(test.unit.api.lookup_pattern) add_subdirectory(test.unit.api.mismatched_handlers) add_subdirectory(test.unit.api.parse_format) add_subdirectory(test.unit.bundle.util) -if(WIN32) +if(_BUILD_AS_WIN32) add_subdirectory(test.unit.bundle.winini) -endif(WIN32) +endif(_BUILD_AS_WIN32) #[====[ add_subdirectory(test.unit.failure.mismatched.arguments) #]====] @@ -22,16 +22,16 @@ add_subdirectory(test.unit.shims.fast_integers) add_subdirectory(test.unit.sink.auto_buffer) add_subdirectory(test.unit.sink.c_string) add_subdirectory(test.unit.sink.char_buffer) -if(WIN32) +if(_BUILD_AS_WIN32) add_subdirectory(test.unit.sink.CString) -endif(WIN32) +endif(_BUILD_AS_WIN32) add_subdirectory(test.unit.sink.null) add_subdirectory(test.unit.sink.ostream) -if(WIN32) +if(_BUILD_AS_WIN32) add_subdirectory(test.unit.sink.OutputDebugString) -endif(WIN32) +endif(_BUILD_AS_WIN32) add_subdirectory(test.unit.sink.stringstream) From 2253a5d90b329fd2e73f66a1bebf607c6274bbd2 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 18 Sep 2026 06:28:39 +1000 Subject: [PATCH 10/17] fix(fastformat): format reals via fastformat_util_snprintf Replace the secure/non-secure sprintf fork in the floating-point filter shim with fastformat_util_snprintf, clearing Apple Clang's deprecated sprintf error under -Werror; silence -Wdeprecated-declarations for the custom_type.inserter example that still calls sprintf; --- .../CMakeLists.txt | 15 +++--- .../shims/conversion/filter_type/reals.hpp | 47 +++++++------------ 2 files changed, 25 insertions(+), 37 deletions(-) diff --git a/examples/example.overload.2.custom_type.inserter/CMakeLists.txt b/examples/example.overload.2.custom_type.inserter/CMakeLists.txt index 53eb0d3..3ab73ab 100644 --- a/examples/example.overload.2.custom_type.inserter/CMakeLists.txt +++ b/examples/example.overload.2.custom_type.inserter/CMakeLists.txt @@ -1,19 +1,20 @@ add_executable(example.overload.2.custom_type.inserter - example.overload.2.custom_type.inserter.cpp + example.overload.2.custom_type.inserter.cpp ) target_link_libraries(example.overload.2.custom_type.inserter - fastformat + fastformat ) target_compile_options(example.overload.2.custom_type.inserter PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-deprecated-declarations + > + $<$: /WX /W4> ) diff --git a/include/fastformat/shims/conversion/filter_type/reals.hpp b/include/fastformat/shims/conversion/filter_type/reals.hpp index 394a9cd..724f743 100644 --- a/include/fastformat/shims/conversion/filter_type/reals.hpp +++ b/include/fastformat/shims/conversion/filter_type/reals.hpp @@ -1,15 +1,15 @@ /* ///////////////////////////////////////////////////////////////////////// - * File: fastformat/shims/conversion/filter_type/reals.hpp + * File: fastformat/shims/conversion/filter_type/reals.hpp * - * Purpose: FastFormat argument conversion shim for floating-point - * types. + * Purpose: FastFormat argument conversion shim for floating-point types. * - * Created: 1st June 2008 - * Updated: 23rd July 2010 + * Created: 1st June 2008 + * Updated: 18th September 2026 * - * Home: http://www.fastformat.org/ + * Home: http://www.fastformat.org/ * - * Copyright (c) 2008-2010, Matthew Wilson and Synesis Software + * Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems + * Copyright (c) 2008-2019, Matthew Wilson and Synesis Software * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -55,10 +55,11 @@ #ifndef FASTFORMAT_DOCUMENTATION_SKIP_SECTION # define FASTFORMAT_VER_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_REALS_MAJOR 1 # define FASTFORMAT_VER_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_REALS_MINOR 2 -# define FASTFORMAT_VER_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_REALS_REVISION 2 -# define FASTFORMAT_VER_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_REALS_EDIT 8 +# define FASTFORMAT_VER_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_REALS_REVISION 3 +# define FASTFORMAT_VER_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_REALS_EDIT 9 #endif /* !FASTFORMAT_DOCUMENTATION_SKIP_SECTION */ + /* ///////////////////////////////////////////////////////////////////////// * Language */ @@ -67,6 +68,7 @@ # error This file can only be included in C++ compilation units #endif /* !__cplusplus */ + /* ///////////////////////////////////////////////////////////////////////// * Includes */ @@ -74,11 +76,13 @@ #include #include #include +#include #include #include + /* ///////////////////////////////////////////////////////////////////////// * Namespace */ @@ -90,6 +94,7 @@ namespace filters { #endif /* !FASTFORMAT_NO_NAMESPACE */ + /* ///////////////////////////////////////////////////////////////////////// * Overloadable conversion shim functions: * @@ -106,25 +111,7 @@ inline stlsoft::basic_shim_string filter_type(double value, doubl ff_char_t num[100]; - // TODO: Sort this properly, using detection of the "Safe" string library, a la Pantheios - - // TODO: Sort this properly, using traits instead of all the preprocessor clutter - -#if defined(__STDC_SECURE_LIB__) && \ - defined(__STDC_WANT_SECURE_LIB__) && \ - __STDC_WANT_SECURE_LIB__ == 1 -# ifdef FASTFORMAT_USE_WIDE_STRINGS - int n = ::swprintf_s(&num[0], STLSOFT_NUM_ELEMENTS(num), fmt, value); -# else /* ? FASTFORMAT_USE_WIDE_STRINGS */ - int n = ::sprintf_s(&num[0], STLSOFT_NUM_ELEMENTS(num), fmt, value); -# endif /* FASTFORMAT_USE_WIDE_STRINGS */ -#else /* ? "secure" */ -# ifdef FASTFORMAT_USE_WIDE_STRINGS - int n = ::swprintf(&num[0], fmt, value); -# else /* ? FASTFORMAT_USE_WIDE_STRINGS */ - int n = ::sprintf(&num[0], fmt, value); -# endif /* FASTFORMAT_USE_WIDE_STRINGS */ -#endif /* "secure" */ + int n = fastformat_util_snprintf(&num[0], STLSOFT_NUM_ELEMENTS(num), fmt, value); if(n < 0) { @@ -144,6 +131,7 @@ inline stlsoft::basic_shim_string filter_type(float value, float return filter_type(value2, &value2, static_cast(0)); } + /* ///////////////////////////////////////////////////////////////////////// * Namespace */ @@ -153,6 +141,7 @@ inline stlsoft::basic_shim_string filter_type(float value, float } /* namespace fastformat */ #endif /* !FASTFORMAT_NO_NAMESPACE */ + /* ///////////////////////////////////////////////////////////////////////// * Inclusion */ @@ -161,8 +150,6 @@ inline stlsoft::basic_shim_string filter_type(float value, float # pragma once #endif /* STLSOFT_PPF_pragma_once_SUPPORT */ -/* ////////////////////////////////////////////////////////////////////// */ - #endif /* FASTFORMAT_INCL_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_REALS */ /* ///////////////////////////// end of file //////////////////////////// */ From 58ae7da357fddf601ec1062c6a4dadcd4196ac76 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 18 Sep 2026 06:38:49 +1000 Subject: [PATCH 11/17] chore(CMake files): SPACEs => TABs --- CMakeLists.txt | 52 ++++----- examples/CMakeLists.txt | 14 +-- .../example.arguments.boolean/CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- .../example.arguments.reals/CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- examples/example.ff_101/CMakeLists.txt | 14 +-- examples/example.flush/CMakeLists.txt | 14 +-- examples/example.inserter.hex/CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- .../example.inserter.integers/CMakeLists.txt | 14 +-- .../example.inserter.reals/CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- examples/example.memory.1/CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- examples/example.pad.hash/CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- examples/example.sink.c_string/CMakeLists.txt | 14 +-- src/CMakeLists.txt | 106 +++++++++--------- test/CMakeLists.txt | 10 +- test/component/CMakeLists.txt | 2 +- .../test.component.FILE/CMakeLists.txt | 16 +-- .../test.component.FILE_stream/CMakeLists.txt | 16 +-- .../CMakeLists.txt | 16 +-- .../CMakeLists.txt | 16 +-- .../CMakeLists.txt | 16 +-- .../CMakeLists.txt | 16 +-- .../CMakeLists.txt | 16 +-- .../CMakeLists.txt | 16 +-- .../CMakeLists.txt | 16 +-- .../test.component.sink.null/CMakeLists.txt | 16 +-- .../CMakeLists.txt | 16 +-- .../CMakeLists.txt | 16 +-- .../CMakeLists.txt | 16 +-- .../CMakeLists.txt | 16 +-- .../CMakeLists.txt | 20 ++-- .../CMakeLists.txt | 20 ++-- .../CMakeLists.txt | 20 ++-- .../CMakeLists.txt | 20 ++-- .../CMakeLists.txt | 20 ++-- .../CMakeLists.txt | 20 ++-- .../CMakeLists.txt | 20 ++-- .../CMakeLists.txt | 20 ++-- .../test.performance.scenario1/CMakeLists.txt | 20 ++-- .../CMakeLists.txt | 20 ++-- .../CMakeLists.txt | 20 ++-- test/scratch/CMakeLists.txt | 8 +- test/scratch/test.scratch.FILE/CMakeLists.txt | 18 +-- .../test.scratch.ff_test_1/CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../test.scratch.inserter.real/CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../test.scratch.speech/CMakeLists.txt | 18 +-- test/unit/CMakeLists.txt | 6 +- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 20 ++-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../test.unit.api.parse_format/CMakeLists.txt | 18 +-- .../unit/test.unit.bundle.util/CMakeLists.txt | 18 +-- .../test.unit.bundle.winini/CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../CMakeLists.txt | 14 +-- .../CMakeLists.txt | 14 +-- .../CMakeLists.txt | 18 +-- .../test.unit.sink.CString/CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- .../test.unit.sink.auto_buffer/CMakeLists.txt | 18 +-- .../test.unit.sink.c_string/CMakeLists.txt | 18 +-- .../test.unit.sink.char_buffer/CMakeLists.txt | 18 +-- test/unit/test.unit.sink.null/CMakeLists.txt | 18 +-- .../test.unit.sink.ostream/CMakeLists.txt | 18 +-- .../CMakeLists.txt | 18 +-- 92 files changed, 814 insertions(+), 814 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c590aac..986d11e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ # Purpose: Top-level CMake lists file for FastFormat # # Created: 6th February 2024 -# Updated: 17th September 2026 +# Updated: 18th September 2026 # # ######################################################################## # @@ -22,7 +22,7 @@ endif() file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt" LOC_PATH) if(EXISTS "${LOC_PATH}") - message(FATAL_ERROR "You cannot build in a source directory (or any directory with a CMakeLists.txt file). Please make a build subdirectory. Feel free to remove CMakeCache.txt and CMakeFiles.") + message(FATAL_ERROR "You cannot build in a source directory (or any directory with a CMakeLists.txt file). Please make a build subdirectory. Feel free to remove CMakeCache.txt and CMakeFiles.") endif() # directory for CMake specific extensions and source files. @@ -33,9 +33,9 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) # project project(FastFormat - DESCRIPTION "FastFormat is a small, standalone library, that provides extensible C-style string instances and extensible arrays of such." - HOMEPAGE_URL "https://github.com/synesissoftware/FastFormat" - LANGUAGES C CXX + DESCRIPTION "FastFormat is a small, standalone library, that provides extensible C-style string instances and extensible arrays of such." + HOMEPAGE_URL "https://github.com/synesissoftware/FastFormat" + LANGUAGES C CXX ) string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) @@ -204,11 +204,11 @@ endif(BUILD_TESTING) if(BUILD_TESTING) - set(xTests_REQUIRED_VERSION_ 0.26) + set(xTests_REQUIRED_VERSION_ 0.26) - find_package(xTests ${xTests_REQUIRED_VERSION_} REQUIRED) + find_package(xTests ${xTests_REQUIRED_VERSION_} REQUIRED) - message("-- CMake package xTests found (version ${xTests_VERSION}; ${xTests_REQUIRED_VERSION_} requested)") + message("-- CMake package xTests found (version ${xTests_VERSION}; ${xTests_REQUIRED_VERSION_} requested)") endif(BUILD_TESTING) @@ -267,9 +267,9 @@ add_subdirectory(src) if(BUILD_EXAMPLES) - message("-- enabled building of examples ...") + message("-- enabled building of examples ...") - add_subdirectory(examples) + add_subdirectory(examples) else(BUILD_EXAMPLES) message("-- disabled building of examples - define BUILD_EXAMPLES to enable") @@ -281,9 +281,9 @@ endif(BUILD_EXAMPLES) if(BUILD_TESTING) - message("-- enabled building of tests ...") + message("-- enabled building of tests ...") - add_subdirectory(test) + add_subdirectory(test) else(BUILD_TESTING) message("-- disabled building of tests - define BUILD_TESTING to enable") @@ -300,32 +300,32 @@ endif(BUILD_TESTING) set(EXPORT_NAME ${PROJECT_NAME_LOWER}) configure_package_config_file( - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${EXPORT_NAME}-config.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-config.cmake - INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/${EXPORT_NAME}/cmake + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${EXPORT_NAME}-config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-config.cmake + INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/${EXPORT_NAME}/cmake ) write_basic_package_version_file( - ${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-config-version.cmake - VERSION ${PROJECT_VERSION} - COMPATIBILITY AnyNewerVersion + ${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-config-version.cmake + VERSION ${PROJECT_VERSION} + COMPATIBILITY AnyNewerVersion ) export(EXPORT project-targets - FILE "${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-targets.cmake" - NAMESPACE "${PROJECT_NAME}::" + FILE "${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-targets.cmake" + NAMESPACE "${PROJECT_NAME}::" ) install(EXPORT project-targets - NAMESPACE "${PROJECT_NAME}::" - FILE "${EXPORT_NAME}-targets.cmake" - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${EXPORT_NAME} + NAMESPACE "${PROJECT_NAME}::" + FILE "${EXPORT_NAME}-targets.cmake" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${EXPORT_NAME} ) install( FILES - "${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-config.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-config-version.cmake" - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${EXPORT_NAME} + "${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/cmake/${EXPORT_NAME}-config-version.cmake" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${EXPORT_NAME} ) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 936f87b..64b8630 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -3,21 +3,21 @@ include_directories(${CMAKE_SOURCE_DIR}/include) if (APPLE) - message("adding '/usr/local/include' to include-directories for 'examples'") + message("adding '/usr/local/include' to include-directories for 'examples'") - include_directories("/usr/local/include") + include_directories("/usr/local/include") endif() if(_BUILD_AS_UNIX) - add_definitions(-DUNIX) - add_definitions(-Dunix) + add_definitions(-DUNIX) + add_definitions(-Dunix) endif(_BUILD_AS_UNIX) if(_BUILD_AS_WIN32) - message(FATAL_ERROR "Use of CMake on Windows not currently supported") + message(FATAL_ERROR "Use of CMake on Windows not currently supported") endif(_BUILD_AS_WIN32) @@ -32,7 +32,7 @@ add_subdirectory(example.inserter.hex) add_subdirectory(example.inserter.integers) if(_BUILD_AS_WIN32) - add_subdirectory(example.inserter.integers.WindowsLargeIntegers) + add_subdirectory(example.inserter.integers.WindowsLargeIntegers) endif(_BUILD_AS_WIN32) add_subdirectory(example.inserter.reals) add_subdirectory(example.iterators.format_iterator) @@ -51,7 +51,7 @@ add_subdirectory(example.overload.3.tabulations) add_subdirectory(example.pad.hash) if(_BUILD_AS_WIN32) - add_subdirectory(example.sink.OutputDebugString) + add_subdirectory(example.sink.OutputDebugString) endif(_BUILD_AS_WIN32) add_subdirectory(example.sink.c_string) diff --git a/examples/example.arguments.boolean/CMakeLists.txt b/examples/example.arguments.boolean/CMakeLists.txt index fce33de..72e6f0c 100644 --- a/examples/example.arguments.boolean/CMakeLists.txt +++ b/examples/example.arguments.boolean/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.arguments.boolean - example.arguments.boolean.cpp + example.arguments.boolean.cpp ) target_link_libraries(example.arguments.boolean - fastformat + fastformat ) target_compile_options(example.arguments.boolean PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.arguments.character/CMakeLists.txt b/examples/example.arguments.character/CMakeLists.txt index ae551d1..3ac4a4c 100644 --- a/examples/example.arguments.character/CMakeLists.txt +++ b/examples/example.arguments.character/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.arguments.character - example.arguments.character.cpp + example.arguments.character.cpp ) target_link_libraries(example.arguments.character - fastformat + fastformat ) target_compile_options(example.arguments.character PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.arguments.reals/CMakeLists.txt b/examples/example.arguments.reals/CMakeLists.txt index a1fe967..d32ecf6 100644 --- a/examples/example.arguments.reals/CMakeLists.txt +++ b/examples/example.arguments.reals/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.arguments.reals - example.arguments.reals.cpp + example.arguments.reals.cpp ) target_link_libraries(example.arguments.reals - fastformat + fastformat ) target_compile_options(example.arguments.reals PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.arguments.void_pointers/CMakeLists.txt b/examples/example.arguments.void_pointers/CMakeLists.txt index 66562c8..7285878 100644 --- a/examples/example.arguments.void_pointers/CMakeLists.txt +++ b/examples/example.arguments.void_pointers/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.arguments.void_pointers - example.arguments.void_pointers.cpp + example.arguments.void_pointers.cpp ) target_link_libraries(example.arguments.void_pointers - fastformat + fastformat ) target_compile_options(example.arguments.void_pointers PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.ff_101.no_namespace/CMakeLists.txt b/examples/example.ff_101.no_namespace/CMakeLists.txt index 8a3c619..de65d1d 100644 --- a/examples/example.ff_101.no_namespace/CMakeLists.txt +++ b/examples/example.ff_101.no_namespace/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.ff_101.no_namespace - example.ff_101.no_namespace.cpp + example.ff_101.no_namespace.cpp ) target_link_libraries(example.ff_101.no_namespace - fastformat + fastformat ) target_compile_options(example.ff_101.no_namespace PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.ff_101/CMakeLists.txt b/examples/example.ff_101/CMakeLists.txt index ce88481..474cd39 100644 --- a/examples/example.ff_101/CMakeLists.txt +++ b/examples/example.ff_101/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.ff_101 - example.ff_101.cpp + example.ff_101.cpp ) target_link_libraries(example.ff_101 - fastformat + fastformat ) target_compile_options(example.ff_101 PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.flush/CMakeLists.txt b/examples/example.flush/CMakeLists.txt index 586f136..8714419 100644 --- a/examples/example.flush/CMakeLists.txt +++ b/examples/example.flush/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.flush - example.flush.cpp + example.flush.cpp ) target_link_libraries(example.flush - fastformat + fastformat ) target_compile_options(example.flush PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.inserter.hex/CMakeLists.txt b/examples/example.inserter.hex/CMakeLists.txt index 4f6ccdb..eede9ea 100644 --- a/examples/example.inserter.hex/CMakeLists.txt +++ b/examples/example.inserter.hex/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.inserter.hex - example.inserter.hex.cpp + example.inserter.hex.cpp ) target_link_libraries(example.inserter.hex - fastformat + fastformat ) target_compile_options(example.inserter.hex PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.inserter.integers.WindowsLargeIntegers/CMakeLists.txt b/examples/example.inserter.integers.WindowsLargeIntegers/CMakeLists.txt index a23927b..b28c3db 100644 --- a/examples/example.inserter.integers.WindowsLargeIntegers/CMakeLists.txt +++ b/examples/example.inserter.integers.WindowsLargeIntegers/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.inserter.integers.WindowsLargeIntegers - example.inserter.integers.WindowsLargeIntegers.cpp + example.inserter.integers.WindowsLargeIntegers.cpp ) target_link_libraries(example.inserter.integers.WindowsLargeIntegers - fastformat + fastformat ) target_compile_options(example.inserter.integers.WindowsLargeIntegers PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.inserter.integers/CMakeLists.txt b/examples/example.inserter.integers/CMakeLists.txt index 94d92ec..5289887 100644 --- a/examples/example.inserter.integers/CMakeLists.txt +++ b/examples/example.inserter.integers/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.inserter.integers - example.inserter.integers.cpp + example.inserter.integers.cpp ) target_link_libraries(example.inserter.integers - fastformat + fastformat ) target_compile_options(example.inserter.integers PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.inserter.reals/CMakeLists.txt b/examples/example.inserter.reals/CMakeLists.txt index 02ea03b..209217a 100644 --- a/examples/example.inserter.reals/CMakeLists.txt +++ b/examples/example.inserter.reals/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.inserter.reals - example.inserter.reals.cpp + example.inserter.reals.cpp ) target_link_libraries(example.inserter.reals - fastformat + fastformat ) target_compile_options(example.inserter.reals PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.iterators.format_iterator/CMakeLists.txt b/examples/example.iterators.format_iterator/CMakeLists.txt index 5209eb0..368dafb 100644 --- a/examples/example.iterators.format_iterator/CMakeLists.txt +++ b/examples/example.iterators.format_iterator/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.iterators.format_iterator - example.iterators.format_iterator.cpp + example.iterators.format_iterator.cpp ) target_link_libraries(example.iterators.format_iterator - fastformat + fastformat ) target_compile_options(example.iterators.format_iterator PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.memory.1/CMakeLists.txt b/examples/example.memory.1/CMakeLists.txt index 30ac720..9915c77 100644 --- a/examples/example.memory.1/CMakeLists.txt +++ b/examples/example.memory.1/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.memory.1 - example.memory.1.cpp + example.memory.1.cpp ) target_link_libraries(example.memory.1 - fastformat + fastformat ) target_compile_options(example.memory.1 PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.overload.2.custom_type.filter_type/CMakeLists.txt b/examples/example.overload.2.custom_type.filter_type/CMakeLists.txt index 2bd76ac..1213ae3 100644 --- a/examples/example.overload.2.custom_type.filter_type/CMakeLists.txt +++ b/examples/example.overload.2.custom_type.filter_type/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.overload.2.custom_type.filter_type - example.overload.2.custom_type.filter_type.cpp + example.overload.2.custom_type.filter_type.cpp ) target_link_libraries(example.overload.2.custom_type.filter_type - fastformat + fastformat ) target_compile_options(example.overload.2.custom_type.filter_type PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.overload.2.custom_type.string_access_shims/CMakeLists.txt b/examples/example.overload.2.custom_type.string_access_shims/CMakeLists.txt index 7d9ff79..476ceca 100644 --- a/examples/example.overload.2.custom_type.string_access_shims/CMakeLists.txt +++ b/examples/example.overload.2.custom_type.string_access_shims/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.overload.2.custom_type.string_access_shims - example.overload.2.custom_type.string_access_shims.cpp + example.overload.2.custom_type.string_access_shims.cpp ) target_link_libraries(example.overload.2.custom_type.string_access_shims - fastformat + fastformat ) target_compile_options(example.overload.2.custom_type.string_access_shims PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.overload.3.floatingpoint_columns/CMakeLists.txt b/examples/example.overload.3.floatingpoint_columns/CMakeLists.txt index 0a6a3c3..8ad3b2c 100644 --- a/examples/example.overload.3.floatingpoint_columns/CMakeLists.txt +++ b/examples/example.overload.3.floatingpoint_columns/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.overload.3.floatingpoint_columns - example.overload.3.floatingpoint_columns.cpp + example.overload.3.floatingpoint_columns.cpp ) target_link_libraries(example.overload.3.floatingpoint_columns - fastformat + fastformat ) target_compile_options(example.overload.3.floatingpoint_columns PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.overload.3.record_insert/CMakeLists.txt b/examples/example.overload.3.record_insert/CMakeLists.txt index eec72c7..0977a79 100644 --- a/examples/example.overload.3.record_insert/CMakeLists.txt +++ b/examples/example.overload.3.record_insert/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.overload.3.record_insert - example.overload.3.record_insert.cpp + example.overload.3.record_insert.cpp ) target_link_libraries(example.overload.3.record_insert - fastformat + fastformat ) target_compile_options(example.overload.3.record_insert PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.overload.3.server_log/CMakeLists.txt b/examples/example.overload.3.server_log/CMakeLists.txt index 297f9d6..5e49802 100644 --- a/examples/example.overload.3.server_log/CMakeLists.txt +++ b/examples/example.overload.3.server_log/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.overload.3.server_log - example.overload.3.server_log.cpp + example.overload.3.server_log.cpp ) target_link_libraries(example.overload.3.server_log - fastformat + fastformat ) target_compile_options(example.overload.3.server_log PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.overload.3.tabulations/CMakeLists.txt b/examples/example.overload.3.tabulations/CMakeLists.txt index 0354f4c..53f535b 100644 --- a/examples/example.overload.3.tabulations/CMakeLists.txt +++ b/examples/example.overload.3.tabulations/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.overload.3.tabulations - example.overload.3.tabulations.cpp + example.overload.3.tabulations.cpp ) target_link_libraries(example.overload.3.tabulations - fastformat + fastformat ) target_compile_options(example.overload.3.tabulations PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.pad.hash/CMakeLists.txt b/examples/example.pad.hash/CMakeLists.txt index a874ab6..4a84c63 100644 --- a/examples/example.pad.hash/CMakeLists.txt +++ b/examples/example.pad.hash/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.pad.hash - example.pad.hash.cpp + example.pad.hash.cpp ) target_link_libraries(example.pad.hash - fastformat + fastformat ) target_compile_options(example.pad.hash PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.sink.OutputDebugString/CMakeLists.txt b/examples/example.sink.OutputDebugString/CMakeLists.txt index f1d2757..a423c3f 100644 --- a/examples/example.sink.OutputDebugString/CMakeLists.txt +++ b/examples/example.sink.OutputDebugString/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.sink.OutputDebugString - example.sink.OutputDebugString.cpp + example.sink.OutputDebugString.cpp ) target_link_libraries(example.sink.OutputDebugString - fastformat + fastformat ) target_compile_options(example.sink.OutputDebugString PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/examples/example.sink.c_string/CMakeLists.txt b/examples/example.sink.c_string/CMakeLists.txt index 105a09e..c255e0e 100644 --- a/examples/example.sink.c_string/CMakeLists.txt +++ b/examples/example.sink.c_string/CMakeLists.txt @@ -1,19 +1,19 @@ add_executable(example.sink.c_string - example.sink.c_string.cpp + example.sink.c_string.cpp ) target_link_libraries(example.sink.c_string - fastformat + fastformat ) target_compile_options(example.sink.c_string PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9f40513..7d0b0a4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,35 +1,35 @@ set(CORE_SRCS - api.cpp - bitbucket - fmt_cache.cpp - fmt_spec_defect_handlers.cpp - init_code_strings.cpp - memory_pool.cpp - replacements.cpp - snprintf.cpp + api.cpp + bitbucket + fmt_cache.cpp + fmt_spec_defect_handlers.cpp + init_code_strings.cpp + memory_pool.cpp + replacements.cpp + snprintf.cpp ) add_library(fastformat - ${CORE_SRCS} + ${CORE_SRCS} ) if (APPLE) - message("-- -- adding '/usr/local/include' to include-directories for 'src'") + message("-- -- adding '/usr/local/include' to include-directories for 'src'") - include_directories("/usr/local/include") + include_directories("/usr/local/include") endif() if(_BUILD_AS_UNIX) - add_definitions(-DUNIX) - add_definitions(-Dunix) + add_definitions(-DUNIX) + add_definitions(-Dunix) endif(_BUILD_AS_UNIX) if(_BUILD_AS_WIN32) - message(FATAL_ERROR "Use of CMake on Windows not currently supported") + message(FATAL_ERROR "Use of CMake on Windows not currently supported") endif(_BUILD_AS_WIN32) @@ -40,33 +40,33 @@ endif(_BUILD_AS_WIN32) # header files from sub-directories, so this is done below in an additional # `install()` step set(CORE_PUBLIC_HEADERS - "${CMAKE_SOURCE_DIR}/include/${PROJECT_NAME_LOWER}/${PROJECT_NAME_LOWER}.h" - "${CMAKE_SOURCE_DIR}/include/${PROJECT_NAME_LOWER}/fastformat.hpp" + "${CMAKE_SOURCE_DIR}/include/${PROJECT_NAME_LOWER}/${PROJECT_NAME_LOWER}.h" + "${CMAKE_SOURCE_DIR}/include/${PROJECT_NAME_LOWER}/fastformat.hpp" ) set_target_properties(fastformat PROPERTIES - OUTPUT_NAME "fastformat" - PUBLIC_HEADER "${CORE_PUBLIC_HEADERS}" + OUTPUT_NAME "fastformat" + PUBLIC_HEADER "${CORE_PUBLIC_HEADERS}" ) target_include_directories(fastformat PUBLIC - $ - $ + $ + $ ) target_compile_options(fastformat PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic - - -Wno-deprecated-copy-with-user-provided-copy - # -Wno-missing-braces - # -Wno-missing-field-initializers - # -Wno-unused-parameter - # -Wno-unused-value - > - $<$: - /WX /W4 - > + $<$,$,$>: + -Werror -Wall -Wextra -pedantic + + -Wno-deprecated-copy-with-user-provided-copy + # -Wno-missing-braces + # -Wno-missing-field-initializers + # -Wno-unused-parameter + # -Wno-unused-value + > + $<$: + /WX /W4 + > ) @@ -74,34 +74,34 @@ target_compile_options(fastformat PRIVATE # install install(TARGETS fastformat - EXPORT project-targets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME_LOWER} + EXPORT project-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME_LOWER} ) # additional headers into specific sub-directories foreach(ITEM - bundles - format - inserters - internal - iterators - quality - shims - sinks - test - util + bundles + format + inserters + internal + iterators + quality + shims + sinks + test + util ) - install( - DIRECTORY ${CMAKE_SOURCE_DIR}/include/${PROJECT_NAME_LOWER}/${ITEM} - DESTINATION include/${PROJECT_NAME_LOWER}/ - FILES_MATCHING - PATTERN "*.h*" - ) + install( + DIRECTORY ${CMAKE_SOURCE_DIR}/include/${PROJECT_NAME_LOWER}/${ITEM} + DESTINATION include/${PROJECT_NAME_LOWER}/ + FILES_MATCHING + PATTERN "*.h*" + ) endforeach() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8902a43..c0da9c9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,21 +3,21 @@ include_directories(${CMAKE_SOURCE_DIR}/include) if (APPLE) - message("adding '/usr/local/include' to include-directories for 'test'") + message("adding '/usr/local/include' to include-directories for 'test'") - include_directories("/usr/local/include") + include_directories("/usr/local/include") endif() if(_BUILD_AS_UNIX) - add_definitions(-DUNIX) - add_definitions(-Dunix) + add_definitions(-DUNIX) + add_definitions(-Dunix) endif(_BUILD_AS_UNIX) if(WIN32) - message(FATAL_ERROR "Use of CMake on Windows not currently supported") + message(FATAL_ERROR "Use of CMake on Windows not currently supported") endif(WIN32) diff --git a/test/component/CMakeLists.txt b/test/component/CMakeLists.txt index 36c1dda..d6b711b 100644 --- a/test/component/CMakeLists.txt +++ b/test/component/CMakeLists.txt @@ -9,7 +9,7 @@ add_subdirectory(test.component.iterators.format_iterator) add_subdirectory(test.component.sink.auto_buffer) if(WIN32) - add_subdirectory(test.component.sink.CComBSTR) + add_subdirectory(test.component.sink.CComBSTR) endif(WIN32) add_subdirectory(test.component.sink.null) add_subdirectory(test.component.sink.ostream) diff --git a/test/component/test.component.FILE/CMakeLists.txt b/test/component/test.component.FILE/CMakeLists.txt index 8e20db3..a6a7a64 100644 --- a/test/component/test.component.FILE/CMakeLists.txt +++ b/test/component/test.component.FILE/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.FILE - test.component.FILE.cpp + test.component.FILE.cpp ) target_link_libraries(test.component.FILE - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.FILE PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.FILE_stream/CMakeLists.txt b/test/component/test.component.FILE_stream/CMakeLists.txt index 356db22..0c710b1 100644 --- a/test/component/test.component.FILE_stream/CMakeLists.txt +++ b/test/component/test.component.FILE_stream/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.FILE_stream - test.component.FILE_stream.cpp + test.component.FILE_stream.cpp ) target_link_libraries(test.component.FILE_stream - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.FILE_stream PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.format_specification_defect_exceptions/CMakeLists.txt b/test/component/test.component.format_specification_defect_exceptions/CMakeLists.txt index 4e7f487..e43a514 100644 --- a/test/component/test.component.format_specification_defect_exceptions/CMakeLists.txt +++ b/test/component/test.component.format_specification_defect_exceptions/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.format_specification_defect_exceptions - test.component.format_specification_defect_exceptions.cpp + test.component.format_specification_defect_exceptions.cpp ) target_link_libraries(test.component.format_specification_defect_exceptions - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.format_specification_defect_exceptions PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.inserter.hex/CMakeLists.txt b/test/component/test.component.inserter.hex/CMakeLists.txt index c1c56e7..2150fa3 100644 --- a/test/component/test.component.inserter.hex/CMakeLists.txt +++ b/test/component/test.component.inserter.hex/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.inserter.hex - test.component.inserter.hex.cpp + test.component.inserter.hex.cpp ) target_link_libraries(test.component.inserter.hex - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.inserter.hex PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.inserter.integer/CMakeLists.txt b/test/component/test.component.inserter.integer/CMakeLists.txt index 9609d43..ba018fc 100644 --- a/test/component/test.component.inserter.integer/CMakeLists.txt +++ b/test/component/test.component.inserter.integer/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.inserter.integer - test.component.inserter.integer.cpp + test.component.inserter.integer.cpp ) target_link_libraries(test.component.inserter.integer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.inserter.integer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.inserter.real/CMakeLists.txt b/test/component/test.component.inserter.real/CMakeLists.txt index 45afae3..7f3cf2a 100644 --- a/test/component/test.component.inserter.real/CMakeLists.txt +++ b/test/component/test.component.inserter.real/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.inserter.real - test.component.inserter.real.cpp + test.component.inserter.real.cpp ) target_link_libraries(test.component.inserter.real - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.inserter.real PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.iterators.format_iterator/CMakeLists.txt b/test/component/test.component.iterators.format_iterator/CMakeLists.txt index c35c04f..a7bbdc1 100644 --- a/test/component/test.component.iterators.format_iterator/CMakeLists.txt +++ b/test/component/test.component.iterators.format_iterator/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.iterators.format_iterator - test.component.iterators.format_iterator.cpp + test.component.iterators.format_iterator.cpp ) target_link_libraries(test.component.iterators.format_iterator - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.iterators.format_iterator PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.sink.CComBSTR/CMakeLists.txt b/test/component/test.component.sink.CComBSTR/CMakeLists.txt index ef780e5..3f6798b 100644 --- a/test/component/test.component.sink.CComBSTR/CMakeLists.txt +++ b/test/component/test.component.sink.CComBSTR/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.sink.CComBSTR - test.component.sink.CComBSTR.cpp + test.component.sink.CComBSTR.cpp ) target_link_libraries(test.component.sink.CComBSTR - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.sink.CComBSTR PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.sink.auto_buffer/CMakeLists.txt b/test/component/test.component.sink.auto_buffer/CMakeLists.txt index 3d3119a..eaf1083 100644 --- a/test/component/test.component.sink.auto_buffer/CMakeLists.txt +++ b/test/component/test.component.sink.auto_buffer/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.sink.auto_buffer - test.component.sink.auto_buffer.cpp + test.component.sink.auto_buffer.cpp ) target_link_libraries(test.component.sink.auto_buffer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.sink.auto_buffer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.sink.null/CMakeLists.txt b/test/component/test.component.sink.null/CMakeLists.txt index 7854b79..b22a6a0 100644 --- a/test/component/test.component.sink.null/CMakeLists.txt +++ b/test/component/test.component.sink.null/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.sink.null - test.component.sink.null.cpp + test.component.sink.null.cpp ) target_link_libraries(test.component.sink.null - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.sink.null PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.sink.ostream/CMakeLists.txt b/test/component/test.component.sink.ostream/CMakeLists.txt index 7b2e0a0..3d55aa5 100644 --- a/test/component/test.component.sink.ostream/CMakeLists.txt +++ b/test/component/test.component.sink.ostream/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.sink.ostream - test.component.sink.ostream.cpp + test.component.sink.ostream.cpp ) target_link_libraries(test.component.sink.ostream - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.sink.ostream PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.sink.string.fmt/CMakeLists.txt b/test/component/test.component.sink.string.fmt/CMakeLists.txt index 720f4d5..3279f79 100644 --- a/test/component/test.component.sink.string.fmt/CMakeLists.txt +++ b/test/component/test.component.sink.string.fmt/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.sink.string.fmt - test.component.sink.string.fmt.cpp + test.component.sink.string.fmt.cpp ) target_link_libraries(test.component.sink.string.fmt - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.sink.string.fmt PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.sink.string.write/CMakeLists.txt b/test/component/test.component.sink.string.write/CMakeLists.txt index 9f3f4ff..0783957 100644 --- a/test/component/test.component.sink.string.write/CMakeLists.txt +++ b/test/component/test.component.sink.string.write/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.sink.string.write - test.component.sink.string.write.cpp + test.component.sink.string.write.cpp ) target_link_libraries(test.component.sink.string.write - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.sink.string.write PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/component/test.component.sink.string_array/CMakeLists.txt b/test/component/test.component.sink.string_array/CMakeLists.txt index 4ea2bcd..20e28cb 100644 --- a/test/component/test.component.sink.string_array/CMakeLists.txt +++ b/test/component/test.component.sink.string_array/CMakeLists.txt @@ -1,20 +1,20 @@ add_executable(test.component.sink.string_array - test.component.sink.string_array.cpp + test.component.sink.string_array.cpp ) target_link_libraries(test.component.sink.string_array - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.component.sink.string_array PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + > + $<$: /WX /W4> ) diff --git a/test/performance/test.performance.api.parse_format/CMakeLists.txt b/test/performance/test.performance.api.parse_format/CMakeLists.txt index 926cd6f..d0c155a 100644 --- a/test/performance/test.performance.api.parse_format/CMakeLists.txt +++ b/test/performance/test.performance.api.parse_format/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.performance.api.parse_format - test.performance.api.parse_format.cpp + test.performance.api.parse_format.cpp ) target_link_libraries(test.performance.api.parse_format - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.performance.api.parse_format PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - -Wno-unused-value - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + -Wno-unused-value + > + $<$: /WX /W4> ) diff --git a/test/performance/test.performance.boost.karma/CMakeLists.txt b/test/performance/test.performance.boost.karma/CMakeLists.txt index f301337..4126a79 100644 --- a/test/performance/test.performance.boost.karma/CMakeLists.txt +++ b/test/performance/test.performance.boost.karma/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.performance.boost.karma - test.performance.boost.karma.cpp + test.performance.boost.karma.cpp ) target_link_libraries(test.performance.boost.karma - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.performance.boost.karma PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - -Wno-unused-value - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + -Wno-unused-value + > + $<$: /WX /W4> ) diff --git a/test/performance/test.performance.decimal_integer/CMakeLists.txt b/test/performance/test.performance.decimal_integer/CMakeLists.txt index 60c41d4..4e2b964 100644 --- a/test/performance/test.performance.decimal_integer/CMakeLists.txt +++ b/test/performance/test.performance.decimal_integer/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.performance.decimal_integer - test.performance.decimal_integer.cpp + test.performance.decimal_integer.cpp ) target_link_libraries(test.performance.decimal_integer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.performance.decimal_integer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - -Wno-unused-value - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + -Wno-unused-value + > + $<$: /WX /W4> ) diff --git a/test/performance/test.performance.hexadecimal_integer/CMakeLists.txt b/test/performance/test.performance.hexadecimal_integer/CMakeLists.txt index b7cbb78..0de8f0b 100644 --- a/test/performance/test.performance.hexadecimal_integer/CMakeLists.txt +++ b/test/performance/test.performance.hexadecimal_integer/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.performance.hexadecimal_integer - test.performance.hexadecimal_integer.cpp + test.performance.hexadecimal_integer.cpp ) target_link_libraries(test.performance.hexadecimal_integer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.performance.hexadecimal_integer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - -Wno-unused-value - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + -Wno-unused-value + > + $<$: /WX /W4> ) diff --git a/test/performance/test.performance.name_age_height/CMakeLists.txt b/test/performance/test.performance.name_age_height/CMakeLists.txt index d3cf092..cf45e2c 100644 --- a/test/performance/test.performance.name_age_height/CMakeLists.txt +++ b/test/performance/test.performance.name_age_height/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.performance.name_age_height - test.performance.name_age_height.cpp + test.performance.name_age_height.cpp ) target_link_libraries(test.performance.name_age_height - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.performance.name_age_height PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - -Wno-unused-value - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + -Wno-unused-value + > + $<$: /WX /W4> ) diff --git a/test/performance/test.performance.one_integer/CMakeLists.txt b/test/performance/test.performance.one_integer/CMakeLists.txt index dc24647..e3c28db 100644 --- a/test/performance/test.performance.one_integer/CMakeLists.txt +++ b/test/performance/test.performance.one_integer/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.performance.one_integer - test.performance.one_integer.cpp + test.performance.one_integer.cpp ) target_link_libraries(test.performance.one_integer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.performance.one_integer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - -Wno-unused-value - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + -Wno-unused-value + > + $<$: /WX /W4> ) diff --git a/test/performance/test.performance.one_pointer/CMakeLists.txt b/test/performance/test.performance.one_pointer/CMakeLists.txt index 51887cf..465985d 100644 --- a/test/performance/test.performance.one_pointer/CMakeLists.txt +++ b/test/performance/test.performance.one_pointer/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.performance.one_pointer - test.performance.one_pointer.cpp + test.performance.one_pointer.cpp ) target_link_libraries(test.performance.one_pointer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.performance.one_pointer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - -Wno-unused-value - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + -Wno-unused-value + > + $<$: /WX /W4> ) diff --git a/test/performance/test.performance.overload.ex.1/CMakeLists.txt b/test/performance/test.performance.overload.ex.1/CMakeLists.txt index 5598c6b..dde391c 100644 --- a/test/performance/test.performance.overload.ex.1/CMakeLists.txt +++ b/test/performance/test.performance.overload.ex.1/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.performance.overload.ex.1 - test.performance.overload.ex.1.cpp + test.performance.overload.ex.1.cpp ) target_link_libraries(test.performance.overload.ex.1 - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.performance.overload.ex.1 PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - -Wno-unused-value - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + -Wno-unused-value + > + $<$: /WX /W4> ) diff --git a/test/performance/test.performance.scenario1/CMakeLists.txt b/test/performance/test.performance.scenario1/CMakeLists.txt index 7241252..16793cc 100644 --- a/test/performance/test.performance.scenario1/CMakeLists.txt +++ b/test/performance/test.performance.scenario1/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.performance.scenario1 - test.performance.scenario1.cpp + test.performance.scenario1.cpp ) target_link_libraries(test.performance.scenario1 - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.performance.scenario1 PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - -Wno-unused-value - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + -Wno-unused-value + > + $<$: /WX /W4> ) diff --git a/test/performance/test.performance.ten_strings_twice/CMakeLists.txt b/test/performance/test.performance.ten_strings_twice/CMakeLists.txt index 09c4967..2b77a7d 100644 --- a/test/performance/test.performance.ten_strings_twice/CMakeLists.txt +++ b/test/performance/test.performance.ten_strings_twice/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.performance.ten_strings_twice - test.performance.ten_strings_twice.cpp + test.performance.ten_strings_twice.cpp ) target_link_libraries(test.performance.ten_strings_twice - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.performance.ten_strings_twice PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - -Wno-unused-value - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + -Wno-unused-value + > + $<$: /WX /W4> ) diff --git a/test/performance/test.performance.three_strings_one_integer/CMakeLists.txt b/test/performance/test.performance.three_strings_one_integer/CMakeLists.txt index 5ad5794..6a64614 100644 --- a/test/performance/test.performance.three_strings_one_integer/CMakeLists.txt +++ b/test/performance/test.performance.three_strings_one_integer/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.performance.three_strings_one_integer - test.performance.three_strings_one_integer.cpp + test.performance.three_strings_one_integer.cpp ) target_link_libraries(test.performance.three_strings_one_integer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.performance.three_strings_one_integer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - -Wno-unused-value - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + -Wno-unused-value + > + $<$: /WX /W4> ) diff --git a/test/scratch/CMakeLists.txt b/test/scratch/CMakeLists.txt index a533300..a2d4e4a 100644 --- a/test/scratch/CMakeLists.txt +++ b/test/scratch/CMakeLists.txt @@ -18,9 +18,9 @@ add_subdirectory(test.scratch.inserter.integer) add_subdirectory(test.scratch.inserter.real) if(_BUILD_AS_WIN32) - add_subdirectory(test.scratch.overload.3.BSTR_out_parameter) - add_subdirectory(test.scratch.sink.WindowsConsole) - add_subdirectory(test.scratch.sink.WindowsMessageBox) + add_subdirectory(test.scratch.overload.3.BSTR_out_parameter) + add_subdirectory(test.scratch.sink.WindowsConsole) + add_subdirectory(test.scratch.sink.WindowsMessageBox) endif(_BUILD_AS_WIN32) add_subdirectory(test.scratch.sink.auto_buffer) #[====[ @@ -29,7 +29,7 @@ add_subdirectory(test.scratch.sink.vectored_file) add_subdirectory(test.scratch.sinks.shim_string) if(_BUILD_AS_WIN32) - add_subdirectory(test.scratch.speech) + add_subdirectory(test.scratch.speech) endif(_BUILD_AS_WIN32) diff --git a/test/scratch/test.scratch.FILE/CMakeLists.txt b/test/scratch/test.scratch.FILE/CMakeLists.txt index 7eff7a3..403e307 100644 --- a/test/scratch/test.scratch.FILE/CMakeLists.txt +++ b/test/scratch/test.scratch.FILE/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.FILE - test.scratch.FILE.cpp + test.scratch.FILE.cpp ) target_link_libraries(test.scratch.FILE - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.FILE PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.ff_test_1/CMakeLists.txt b/test/scratch/test.scratch.ff_test_1/CMakeLists.txt index 69bd8e2..bed6c10 100644 --- a/test/scratch/test.scratch.ff_test_1/CMakeLists.txt +++ b/test/scratch/test.scratch.ff_test_1/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.ff_test_1 - test.scratch.ff_test_1.cpp + test.scratch.ff_test_1.cpp ) target_link_libraries(test.scratch.ff_test_1 - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.ff_test_1 PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.format_alignment/CMakeLists.txt b/test/scratch/test.scratch.format_alignment/CMakeLists.txt index 8144a94..ee4e0bd 100644 --- a/test/scratch/test.scratch.format_alignment/CMakeLists.txt +++ b/test/scratch/test.scratch.format_alignment/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.format_alignment - test.scratch.format_alignment.cpp + test.scratch.format_alignment.cpp ) target_link_libraries(test.scratch.format_alignment - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.format_alignment PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.format_defects/CMakeLists.txt b/test/scratch/test.scratch.format_defects/CMakeLists.txt index 4094237..adc16ec 100644 --- a/test/scratch/test.scratch.format_defects/CMakeLists.txt +++ b/test/scratch/test.scratch.format_defects/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.format_defects - test.scratch.format_defects.cpp + test.scratch.format_defects.cpp ) target_link_libraries(test.scratch.format_defects - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.format_defects PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.format_iterator/CMakeLists.txt b/test/scratch/test.scratch.format_iterator/CMakeLists.txt index 2bd6e1b..5d0fbbc 100644 --- a/test/scratch/test.scratch.format_iterator/CMakeLists.txt +++ b/test/scratch/test.scratch.format_iterator/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.format_iterator - test.scratch.format_iterator.cpp + test.scratch.format_iterator.cpp ) target_link_libraries(test.scratch.format_iterator - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.format_iterator PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.implicit_integer/CMakeLists.txt b/test/scratch/test.scratch.implicit_integer/CMakeLists.txt index 85eed5a..4839562 100644 --- a/test/scratch/test.scratch.implicit_integer/CMakeLists.txt +++ b/test/scratch/test.scratch.implicit_integer/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.implicit_integer - test.scratch.implicit_integer.cpp + test.scratch.implicit_integer.cpp ) target_link_libraries(test.scratch.implicit_integer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.implicit_integer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.inserter.integer/CMakeLists.txt b/test/scratch/test.scratch.inserter.integer/CMakeLists.txt index 513c20a..eb6be8f 100644 --- a/test/scratch/test.scratch.inserter.integer/CMakeLists.txt +++ b/test/scratch/test.scratch.inserter.integer/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.inserter.integer - test.scratch.inserter.integer.cpp + test.scratch.inserter.integer.cpp ) target_link_libraries(test.scratch.inserter.integer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.inserter.integer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.inserter.real/CMakeLists.txt b/test/scratch/test.scratch.inserter.real/CMakeLists.txt index a1de2c6..c586baa 100644 --- a/test/scratch/test.scratch.inserter.real/CMakeLists.txt +++ b/test/scratch/test.scratch.inserter.real/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.inserter.real - test.scratch.inserter.real.cpp + test.scratch.inserter.real.cpp ) target_link_libraries(test.scratch.inserter.real - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.inserter.real PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.overload.3.BSTR_out_parameter/CMakeLists.txt b/test/scratch/test.scratch.overload.3.BSTR_out_parameter/CMakeLists.txt index 8bc9376..04bb1f8 100644 --- a/test/scratch/test.scratch.overload.3.BSTR_out_parameter/CMakeLists.txt +++ b/test/scratch/test.scratch.overload.3.BSTR_out_parameter/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.overload.3.BSTR_out_parameter - test.scratch.overload.3.BSTR_out_parameter.cpp + test.scratch.overload.3.BSTR_out_parameter.cpp ) target_link_libraries(test.scratch.overload.3.BSTR_out_parameter - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.overload.3.BSTR_out_parameter PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.sink.WindowsConsole/CMakeLists.txt b/test/scratch/test.scratch.sink.WindowsConsole/CMakeLists.txt index 597b460..b751a49 100644 --- a/test/scratch/test.scratch.sink.WindowsConsole/CMakeLists.txt +++ b/test/scratch/test.scratch.sink.WindowsConsole/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.sink.WindowsConsole - test.scratch.sink.WindowsConsole.cpp + test.scratch.sink.WindowsConsole.cpp ) target_link_libraries(test.scratch.sink.WindowsConsole - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.sink.WindowsConsole PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.sink.WindowsMessageBox/CMakeLists.txt b/test/scratch/test.scratch.sink.WindowsMessageBox/CMakeLists.txt index 3939344..2f8d28f 100644 --- a/test/scratch/test.scratch.sink.WindowsMessageBox/CMakeLists.txt +++ b/test/scratch/test.scratch.sink.WindowsMessageBox/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.sink.WindowsMessageBox - test.scratch.sink.WindowsMessageBox.cpp + test.scratch.sink.WindowsMessageBox.cpp ) target_link_libraries(test.scratch.sink.WindowsMessageBox - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.sink.WindowsMessageBox PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.sink.auto_buffer/CMakeLists.txt b/test/scratch/test.scratch.sink.auto_buffer/CMakeLists.txt index d76ea00..cd850f7 100644 --- a/test/scratch/test.scratch.sink.auto_buffer/CMakeLists.txt +++ b/test/scratch/test.scratch.sink.auto_buffer/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.sink.auto_buffer - test.scratch.sink.auto_buffer.cpp + test.scratch.sink.auto_buffer.cpp ) target_link_libraries(test.scratch.sink.auto_buffer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.sink.auto_buffer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.sink.vectored_file/CMakeLists.txt b/test/scratch/test.scratch.sink.vectored_file/CMakeLists.txt index 0026fb6..a314981 100644 --- a/test/scratch/test.scratch.sink.vectored_file/CMakeLists.txt +++ b/test/scratch/test.scratch.sink.vectored_file/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.sink.vectored_file - test.scratch.sink.vectored_file.cpp + test.scratch.sink.vectored_file.cpp ) target_link_libraries(test.scratch.sink.vectored_file - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.sink.vectored_file PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.sinks.shim_string/CMakeLists.txt b/test/scratch/test.scratch.sinks.shim_string/CMakeLists.txt index 1bb436a..927d7b2 100644 --- a/test/scratch/test.scratch.sinks.shim_string/CMakeLists.txt +++ b/test/scratch/test.scratch.sinks.shim_string/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.sinks.shim_string - test.scratch.sinks.shim_string.cpp + test.scratch.sinks.shim_string.cpp ) target_link_libraries(test.scratch.sinks.shim_string - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.sinks.shim_string PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/scratch/test.scratch.speech/CMakeLists.txt b/test/scratch/test.scratch.speech/CMakeLists.txt index 4cfd934..ecfff70 100644 --- a/test/scratch/test.scratch.speech/CMakeLists.txt +++ b/test/scratch/test.scratch.speech/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.scratch.speech - test.scratch.speech.cpp + test.scratch.speech.cpp ) target_link_libraries(test.scratch.speech - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.scratch.speech PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index d6bfe49..7b19771 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -10,7 +10,7 @@ add_subdirectory(test.unit.api.parse_format) add_subdirectory(test.unit.bundle.util) if(_BUILD_AS_WIN32) - add_subdirectory(test.unit.bundle.winini) + add_subdirectory(test.unit.bundle.winini) endif(_BUILD_AS_WIN32) #[====[ add_subdirectory(test.unit.failure.mismatched.arguments) @@ -24,13 +24,13 @@ add_subdirectory(test.unit.sink.c_string) add_subdirectory(test.unit.sink.char_buffer) if(_BUILD_AS_WIN32) - add_subdirectory(test.unit.sink.CString) + add_subdirectory(test.unit.sink.CString) endif(_BUILD_AS_WIN32) add_subdirectory(test.unit.sink.null) add_subdirectory(test.unit.sink.ostream) if(_BUILD_AS_WIN32) - add_subdirectory(test.unit.sink.OutputDebugString) + add_subdirectory(test.unit.sink.OutputDebugString) endif(_BUILD_AS_WIN32) add_subdirectory(test.unit.sink.stringstream) diff --git a/test/unit/test.unit.api.accum_slice_lens/CMakeLists.txt b/test/unit/test.unit.api.accum_slice_lens/CMakeLists.txt index 343e2a1..2d54ee4 100644 --- a/test/unit/test.unit.api.accum_slice_lens/CMakeLists.txt +++ b/test/unit/test.unit.api.accum_slice_lens/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.api.accum_slice_lens - test.unit.api.accum_slice_lens.cpp + test.unit.api.accum_slice_lens.cpp ) target_link_libraries(test.unit.api.accum_slice_lens - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.api.accum_slice_lens PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - # -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.api.crlf_for_platform/CMakeLists.txt b/test/unit/test.unit.api.crlf_for_platform/CMakeLists.txt index d3b62d2..9822a5d 100644 --- a/test/unit/test.unit.api.crlf_for_platform/CMakeLists.txt +++ b/test/unit/test.unit.api.crlf_for_platform/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.api.crlf_for_platform - test.unit.api.crlf_for_platform.cpp + test.unit.api.crlf_for_platform.cpp ) target_link_libraries(test.unit.api.crlf_for_platform - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.api.crlf_for_platform PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - # -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.api.fill_replacements/CMakeLists.txt b/test/unit/test.unit.api.fill_replacements/CMakeLists.txt index 731d0ec..b9ae610 100644 --- a/test/unit/test.unit.api.fill_replacements/CMakeLists.txt +++ b/test/unit/test.unit.api.fill_replacements/CMakeLists.txt @@ -1,22 +1,22 @@ add_executable(test.unit.api.fill_replacements - test.unit.api.fill_replacements.cpp + test.unit.api.fill_replacements.cpp ) target_link_libraries(test.unit.api.fill_replacements - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.api.fill_replacements PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - -Wno-missing-field-initializers - # -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + -Wno-missing-field-initializers + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.api.illformed_handlers/CMakeLists.txt b/test/unit/test.unit.api.illformed_handlers/CMakeLists.txt index 9ae2dde..8e6dc84 100644 --- a/test/unit/test.unit.api.illformed_handlers/CMakeLists.txt +++ b/test/unit/test.unit.api.illformed_handlers/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.api.illformed_handlers - test.unit.api.illformed_handlers.cpp + test.unit.api.illformed_handlers.cpp ) target_link_libraries(test.unit.api.illformed_handlers - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.api.illformed_handlers PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - # -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.api.initialisation/CMakeLists.txt b/test/unit/test.unit.api.initialisation/CMakeLists.txt index 1f0db91..bfce8a8 100644 --- a/test/unit/test.unit.api.initialisation/CMakeLists.txt +++ b/test/unit/test.unit.api.initialisation/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.api.initialisation - test.unit.api.initialisation.cpp + test.unit.api.initialisation.cpp ) target_link_libraries(test.unit.api.initialisation - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.api.initialisation PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - # -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.api.lookup_pattern/CMakeLists.txt b/test/unit/test.unit.api.lookup_pattern/CMakeLists.txt index 70a2a3b..d21a2e0 100644 --- a/test/unit/test.unit.api.lookup_pattern/CMakeLists.txt +++ b/test/unit/test.unit.api.lookup_pattern/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.api.lookup_pattern - test.unit.api.lookup_pattern.cpp + test.unit.api.lookup_pattern.cpp ) target_link_libraries(test.unit.api.lookup_pattern - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.api.lookup_pattern PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - # -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.api.mismatched_handlers/CMakeLists.txt b/test/unit/test.unit.api.mismatched_handlers/CMakeLists.txt index 6d6adb1..c4dab23 100644 --- a/test/unit/test.unit.api.mismatched_handlers/CMakeLists.txt +++ b/test/unit/test.unit.api.mismatched_handlers/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.api.mismatched_handlers - test.unit.api.mismatched_handlers.cpp + test.unit.api.mismatched_handlers.cpp ) target_link_libraries(test.unit.api.mismatched_handlers - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.api.mismatched_handlers PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - # -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.api.parse_format/CMakeLists.txt b/test/unit/test.unit.api.parse_format/CMakeLists.txt index 54986c9..927ba28 100644 --- a/test/unit/test.unit.api.parse_format/CMakeLists.txt +++ b/test/unit/test.unit.api.parse_format/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.api.parse_format - test.unit.api.parse_format.cpp + test.unit.api.parse_format.cpp ) target_link_libraries(test.unit.api.parse_format - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.api.parse_format PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - # -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.bundle.util/CMakeLists.txt b/test/unit/test.unit.bundle.util/CMakeLists.txt index 081f49a..e226211 100644 --- a/test/unit/test.unit.bundle.util/CMakeLists.txt +++ b/test/unit/test.unit.bundle.util/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.bundle.util - test.unit.bundle.util.cpp + test.unit.bundle.util.cpp ) target_link_libraries(test.unit.bundle.util - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.bundle.util PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - # -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.bundle.winini/CMakeLists.txt b/test/unit/test.unit.bundle.winini/CMakeLists.txt index d5f9b0e..1ed4317 100644 --- a/test/unit/test.unit.bundle.winini/CMakeLists.txt +++ b/test/unit/test.unit.bundle.winini/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.bundle.winini - test.unit.bundle.winini.cpp + test.unit.bundle.winini.cpp ) target_link_libraries(test.unit.bundle.winini - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.bundle.winini PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - # -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.failure.mismatched.arguments/CMakeLists.txt b/test/unit/test.unit.failure.mismatched.arguments/CMakeLists.txt index d7a712f..9238ce5 100644 --- a/test/unit/test.unit.failure.mismatched.arguments/CMakeLists.txt +++ b/test/unit/test.unit.failure.mismatched.arguments/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.failure.mismatched.arguments - test.unit.failure.mismatched.arguments.cpp + test.unit.failure.mismatched.arguments.cpp ) target_link_libraries(test.unit.failure.mismatched.arguments - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.failure.mismatched.arguments PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - # -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.format.standard_flags/CMakeLists.txt b/test/unit/test.unit.format.standard_flags/CMakeLists.txt index bca3133..038d54c 100644 --- a/test/unit/test.unit.format.standard_flags/CMakeLists.txt +++ b/test/unit/test.unit.format.standard_flags/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.format.standard_flags - test.unit.format.standard_flags.cpp + test.unit.format.standard_flags.cpp ) target_link_libraries(test.unit.format.standard_flags - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.format.standard_flags PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - # -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + # -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.inserters.character/CMakeLists.txt b/test/unit/test.unit.inserters.character/CMakeLists.txt index 91b8b78..a49260d 100644 --- a/test/unit/test.unit.inserters.character/CMakeLists.txt +++ b/test/unit/test.unit.inserters.character/CMakeLists.txt @@ -1,18 +1,18 @@ add_executable(test.unit.inserters.character - test.unit.inserters.character.cpp + test.unit.inserters.character.cpp ) target_link_libraries(test.unit.inserters.character - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.inserters.character PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic - > - $<$: /WX /W4> + $<$,$,$>: + -Werror -Wall -Wextra -pedantic + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.inserters.integer/CMakeLists.txt b/test/unit/test.unit.inserters.integer/CMakeLists.txt index 798aba0..57e601a 100644 --- a/test/unit/test.unit.inserters.integer/CMakeLists.txt +++ b/test/unit/test.unit.inserters.integer/CMakeLists.txt @@ -1,18 +1,18 @@ add_executable(test.unit.inserters.integer - test.unit.inserters.integer.cpp + test.unit.inserters.integer.cpp ) target_link_libraries(test.unit.inserters.integer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.inserters.integer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic - > - $<$: /WX /W4> + $<$,$,$>: + -Werror -Wall -Wextra -pedantic + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.shims.fast_integers/CMakeLists.txt b/test/unit/test.unit.shims.fast_integers/CMakeLists.txt index 25e640f..8c63f9d 100644 --- a/test/unit/test.unit.shims.fast_integers/CMakeLists.txt +++ b/test/unit/test.unit.shims.fast_integers/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.shims.fast_integers - test.unit.shims.fast_integers.cpp + test.unit.shims.fast_integers.cpp ) target_link_libraries(test.unit.shims.fast_integers - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.shims.fast_integers PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.sink.CString/CMakeLists.txt b/test/unit/test.unit.sink.CString/CMakeLists.txt index f323149..86d370a 100644 --- a/test/unit/test.unit.sink.CString/CMakeLists.txt +++ b/test/unit/test.unit.sink.CString/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.sink.CString - test.unit.sink.CString.cpp + test.unit.sink.CString.cpp ) target_link_libraries(test.unit.sink.CString - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.sink.CString PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.sink.OutputDebugString/CMakeLists.txt b/test/unit/test.unit.sink.OutputDebugString/CMakeLists.txt index 1695324..5dbb192 100644 --- a/test/unit/test.unit.sink.OutputDebugString/CMakeLists.txt +++ b/test/unit/test.unit.sink.OutputDebugString/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.sink.OutputDebugString - test.unit.sink.OutputDebugString.cpp + test.unit.sink.OutputDebugString.cpp ) target_link_libraries(test.unit.sink.OutputDebugString - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.sink.OutputDebugString PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.sink.auto_buffer/CMakeLists.txt b/test/unit/test.unit.sink.auto_buffer/CMakeLists.txt index 2e11567..247b57d 100644 --- a/test/unit/test.unit.sink.auto_buffer/CMakeLists.txt +++ b/test/unit/test.unit.sink.auto_buffer/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.sink.auto_buffer - test.unit.sink.auto_buffer.cpp + test.unit.sink.auto_buffer.cpp ) target_link_libraries(test.unit.sink.auto_buffer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.sink.auto_buffer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - # -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + # -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.sink.c_string/CMakeLists.txt b/test/unit/test.unit.sink.c_string/CMakeLists.txt index 240fa7b..591a0d4 100644 --- a/test/unit/test.unit.sink.c_string/CMakeLists.txt +++ b/test/unit/test.unit.sink.c_string/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.sink.c_string - test.unit.sink.c_string.cpp + test.unit.sink.c_string.cpp ) target_link_libraries(test.unit.sink.c_string - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.sink.c_string PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.sink.char_buffer/CMakeLists.txt b/test/unit/test.unit.sink.char_buffer/CMakeLists.txt index cef7c45..669e149 100644 --- a/test/unit/test.unit.sink.char_buffer/CMakeLists.txt +++ b/test/unit/test.unit.sink.char_buffer/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.sink.char_buffer - test.unit.sink.char_buffer.cpp + test.unit.sink.char_buffer.cpp ) target_link_libraries(test.unit.sink.char_buffer - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.sink.char_buffer PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.sink.null/CMakeLists.txt b/test/unit/test.unit.sink.null/CMakeLists.txt index 65153de..00e8f91 100644 --- a/test/unit/test.unit.sink.null/CMakeLists.txt +++ b/test/unit/test.unit.sink.null/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.sink.null - test.unit.sink.null.cpp + test.unit.sink.null.cpp ) target_link_libraries(test.unit.sink.null - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.sink.null PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.sink.ostream/CMakeLists.txt b/test/unit/test.unit.sink.ostream/CMakeLists.txt index 4fb654b..172aefa 100644 --- a/test/unit/test.unit.sink.ostream/CMakeLists.txt +++ b/test/unit/test.unit.sink.ostream/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.sink.ostream - test.unit.sink.ostream.cpp + test.unit.sink.ostream.cpp ) target_link_libraries(test.unit.sink.ostream - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.sink.ostream PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) diff --git a/test/unit/test.unit.sink.stringstream/CMakeLists.txt b/test/unit/test.unit.sink.stringstream/CMakeLists.txt index ca88d73..8452a6f 100644 --- a/test/unit/test.unit.sink.stringstream/CMakeLists.txt +++ b/test/unit/test.unit.sink.stringstream/CMakeLists.txt @@ -1,21 +1,21 @@ add_executable(test.unit.sink.stringstream - test.unit.sink.stringstream.cpp + test.unit.sink.stringstream.cpp ) target_link_libraries(test.unit.sink.stringstream - fastformat - xTests::xTests.core + fastformat + xTests::xTests.core ) target_compile_options(test.unit.sink.stringstream PRIVATE - $<$,$,$>: - -Werror -Wall -Wextra -pedantic + $<$,$,$>: + -Werror -Wall -Wextra -pedantic - -Wno-deprecated-copy-with-user-provided-copy - -Wno-string-plus-int - > - $<$: /WX /W4> + -Wno-deprecated-copy-with-user-provided-copy + -Wno-string-plus-int + > + $<$: /WX /W4> ) From 70bbe2b98dce5dd5e06bc474956e2fde99e17ba6 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 18 Sep 2026 06:44:22 +1000 Subject: [PATCH 12/17] fix(CMake): backwards-/forwards-compatibility for xTests --- test/component/test.component.FILE/CMakeLists.txt | 2 +- test/component/test.component.FILE_stream/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- test/component/test.component.inserter.hex/CMakeLists.txt | 2 +- test/component/test.component.inserter.integer/CMakeLists.txt | 2 +- test/component/test.component.inserter.real/CMakeLists.txt | 2 +- .../test.component.iterators.format_iterator/CMakeLists.txt | 2 +- test/component/test.component.sink.CComBSTR/CMakeLists.txt | 2 +- test/component/test.component.sink.auto_buffer/CMakeLists.txt | 2 +- test/component/test.component.sink.null/CMakeLists.txt | 2 +- test/component/test.component.sink.ostream/CMakeLists.txt | 2 +- test/component/test.component.sink.string.fmt/CMakeLists.txt | 2 +- test/component/test.component.sink.string.write/CMakeLists.txt | 2 +- test/component/test.component.sink.string_array/CMakeLists.txt | 2 +- .../test.performance.api.parse_format/CMakeLists.txt | 2 +- test/performance/test.performance.boost.karma/CMakeLists.txt | 2 +- .../performance/test.performance.decimal_integer/CMakeLists.txt | 2 +- .../test.performance.hexadecimal_integer/CMakeLists.txt | 2 +- .../performance/test.performance.name_age_height/CMakeLists.txt | 2 +- test/performance/test.performance.one_integer/CMakeLists.txt | 2 +- test/performance/test.performance.one_pointer/CMakeLists.txt | 2 +- test/performance/test.performance.overload.ex.1/CMakeLists.txt | 2 +- test/performance/test.performance.scenario1/CMakeLists.txt | 2 +- .../test.performance.ten_strings_twice/CMakeLists.txt | 2 +- .../test.performance.three_strings_one_integer/CMakeLists.txt | 2 +- test/scratch/test.scratch.FILE/CMakeLists.txt | 2 +- test/scratch/test.scratch.ff_test_1/CMakeLists.txt | 2 +- test/scratch/test.scratch.format_alignment/CMakeLists.txt | 2 +- test/scratch/test.scratch.format_defects/CMakeLists.txt | 2 +- test/scratch/test.scratch.format_iterator/CMakeLists.txt | 2 +- test/scratch/test.scratch.implicit_integer/CMakeLists.txt | 2 +- test/scratch/test.scratch.inserter.integer/CMakeLists.txt | 2 +- test/scratch/test.scratch.inserter.real/CMakeLists.txt | 2 +- .../test.scratch.overload.3.BSTR_out_parameter/CMakeLists.txt | 2 +- test/scratch/test.scratch.sink.WindowsConsole/CMakeLists.txt | 2 +- test/scratch/test.scratch.sink.WindowsMessageBox/CMakeLists.txt | 2 +- test/scratch/test.scratch.sink.auto_buffer/CMakeLists.txt | 2 +- test/scratch/test.scratch.sink.vectored_file/CMakeLists.txt | 2 +- test/scratch/test.scratch.sinks.shim_string/CMakeLists.txt | 2 +- test/scratch/test.scratch.speech/CMakeLists.txt | 2 +- test/unit/test.unit.api.accum_slice_lens/CMakeLists.txt | 2 +- test/unit/test.unit.api.crlf_for_platform/CMakeLists.txt | 2 +- test/unit/test.unit.api.fill_replacements/CMakeLists.txt | 2 +- test/unit/test.unit.api.illformed_handlers/CMakeLists.txt | 2 +- test/unit/test.unit.api.initialisation/CMakeLists.txt | 2 +- test/unit/test.unit.api.lookup_pattern/CMakeLists.txt | 2 +- test/unit/test.unit.api.mismatched_handlers/CMakeLists.txt | 2 +- test/unit/test.unit.api.parse_format/CMakeLists.txt | 2 +- test/unit/test.unit.bundle.util/CMakeLists.txt | 2 +- test/unit/test.unit.bundle.winini/CMakeLists.txt | 2 +- test/unit/test.unit.failure.mismatched.arguments/CMakeLists.txt | 2 +- test/unit/test.unit.format.standard_flags/CMakeLists.txt | 2 +- test/unit/test.unit.inserters.character/CMakeLists.txt | 2 +- test/unit/test.unit.inserters.integer/CMakeLists.txt | 2 +- test/unit/test.unit.shims.fast_integers/CMakeLists.txt | 2 +- test/unit/test.unit.sink.CString/CMakeLists.txt | 2 +- test/unit/test.unit.sink.OutputDebugString/CMakeLists.txt | 2 +- test/unit/test.unit.sink.auto_buffer/CMakeLists.txt | 2 +- test/unit/test.unit.sink.c_string/CMakeLists.txt | 2 +- test/unit/test.unit.sink.char_buffer/CMakeLists.txt | 2 +- test/unit/test.unit.sink.null/CMakeLists.txt | 2 +- test/unit/test.unit.sink.ostream/CMakeLists.txt | 2 +- test/unit/test.unit.sink.stringstream/CMakeLists.txt | 2 +- 63 files changed, 63 insertions(+), 63 deletions(-) diff --git a/test/component/test.component.FILE/CMakeLists.txt b/test/component/test.component.FILE/CMakeLists.txt index a6a7a64..42b82dd 100644 --- a/test/component/test.component.FILE/CMakeLists.txt +++ b/test/component/test.component.FILE/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.FILE target_link_libraries(test.component.FILE fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.FILE PRIVATE diff --git a/test/component/test.component.FILE_stream/CMakeLists.txt b/test/component/test.component.FILE_stream/CMakeLists.txt index 0c710b1..72b1222 100644 --- a/test/component/test.component.FILE_stream/CMakeLists.txt +++ b/test/component/test.component.FILE_stream/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.FILE_stream target_link_libraries(test.component.FILE_stream fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.FILE_stream PRIVATE diff --git a/test/component/test.component.format_specification_defect_exceptions/CMakeLists.txt b/test/component/test.component.format_specification_defect_exceptions/CMakeLists.txt index e43a514..5ce63a0 100644 --- a/test/component/test.component.format_specification_defect_exceptions/CMakeLists.txt +++ b/test/component/test.component.format_specification_defect_exceptions/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.format_specification_defect_exceptions target_link_libraries(test.component.format_specification_defect_exceptions fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.format_specification_defect_exceptions PRIVATE diff --git a/test/component/test.component.inserter.hex/CMakeLists.txt b/test/component/test.component.inserter.hex/CMakeLists.txt index 2150fa3..295f1d5 100644 --- a/test/component/test.component.inserter.hex/CMakeLists.txt +++ b/test/component/test.component.inserter.hex/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.inserter.hex target_link_libraries(test.component.inserter.hex fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.inserter.hex PRIVATE diff --git a/test/component/test.component.inserter.integer/CMakeLists.txt b/test/component/test.component.inserter.integer/CMakeLists.txt index ba018fc..126e993 100644 --- a/test/component/test.component.inserter.integer/CMakeLists.txt +++ b/test/component/test.component.inserter.integer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.inserter.integer target_link_libraries(test.component.inserter.integer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.inserter.integer PRIVATE diff --git a/test/component/test.component.inserter.real/CMakeLists.txt b/test/component/test.component.inserter.real/CMakeLists.txt index 7f3cf2a..813cf12 100644 --- a/test/component/test.component.inserter.real/CMakeLists.txt +++ b/test/component/test.component.inserter.real/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.inserter.real target_link_libraries(test.component.inserter.real fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.inserter.real PRIVATE diff --git a/test/component/test.component.iterators.format_iterator/CMakeLists.txt b/test/component/test.component.iterators.format_iterator/CMakeLists.txt index a7bbdc1..0c5d2b9 100644 --- a/test/component/test.component.iterators.format_iterator/CMakeLists.txt +++ b/test/component/test.component.iterators.format_iterator/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.iterators.format_iterator target_link_libraries(test.component.iterators.format_iterator fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.iterators.format_iterator PRIVATE diff --git a/test/component/test.component.sink.CComBSTR/CMakeLists.txt b/test/component/test.component.sink.CComBSTR/CMakeLists.txt index 3f6798b..7d1c4d5 100644 --- a/test/component/test.component.sink.CComBSTR/CMakeLists.txt +++ b/test/component/test.component.sink.CComBSTR/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.sink.CComBSTR target_link_libraries(test.component.sink.CComBSTR fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.sink.CComBSTR PRIVATE diff --git a/test/component/test.component.sink.auto_buffer/CMakeLists.txt b/test/component/test.component.sink.auto_buffer/CMakeLists.txt index eaf1083..a4a9229 100644 --- a/test/component/test.component.sink.auto_buffer/CMakeLists.txt +++ b/test/component/test.component.sink.auto_buffer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.sink.auto_buffer target_link_libraries(test.component.sink.auto_buffer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.sink.auto_buffer PRIVATE diff --git a/test/component/test.component.sink.null/CMakeLists.txt b/test/component/test.component.sink.null/CMakeLists.txt index b22a6a0..8c3d847 100644 --- a/test/component/test.component.sink.null/CMakeLists.txt +++ b/test/component/test.component.sink.null/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.sink.null target_link_libraries(test.component.sink.null fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.sink.null PRIVATE diff --git a/test/component/test.component.sink.ostream/CMakeLists.txt b/test/component/test.component.sink.ostream/CMakeLists.txt index 3d55aa5..9b2094e 100644 --- a/test/component/test.component.sink.ostream/CMakeLists.txt +++ b/test/component/test.component.sink.ostream/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.sink.ostream target_link_libraries(test.component.sink.ostream fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.sink.ostream PRIVATE diff --git a/test/component/test.component.sink.string.fmt/CMakeLists.txt b/test/component/test.component.sink.string.fmt/CMakeLists.txt index 3279f79..9ac84af 100644 --- a/test/component/test.component.sink.string.fmt/CMakeLists.txt +++ b/test/component/test.component.sink.string.fmt/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.sink.string.fmt target_link_libraries(test.component.sink.string.fmt fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.sink.string.fmt PRIVATE diff --git a/test/component/test.component.sink.string.write/CMakeLists.txt b/test/component/test.component.sink.string.write/CMakeLists.txt index 0783957..2233c5a 100644 --- a/test/component/test.component.sink.string.write/CMakeLists.txt +++ b/test/component/test.component.sink.string.write/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.sink.string.write target_link_libraries(test.component.sink.string.write fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.sink.string.write PRIVATE diff --git a/test/component/test.component.sink.string_array/CMakeLists.txt b/test/component/test.component.sink.string_array/CMakeLists.txt index 20e28cb..d335d8f 100644 --- a/test/component/test.component.sink.string_array/CMakeLists.txt +++ b/test/component/test.component.sink.string_array/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.component.sink.string_array target_link_libraries(test.component.sink.string_array fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.component.sink.string_array PRIVATE diff --git a/test/performance/test.performance.api.parse_format/CMakeLists.txt b/test/performance/test.performance.api.parse_format/CMakeLists.txt index d0c155a..97cc695 100644 --- a/test/performance/test.performance.api.parse_format/CMakeLists.txt +++ b/test/performance/test.performance.api.parse_format/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.performance.api.parse_format target_link_libraries(test.performance.api.parse_format fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.performance.api.parse_format PRIVATE diff --git a/test/performance/test.performance.boost.karma/CMakeLists.txt b/test/performance/test.performance.boost.karma/CMakeLists.txt index 4126a79..ad18f05 100644 --- a/test/performance/test.performance.boost.karma/CMakeLists.txt +++ b/test/performance/test.performance.boost.karma/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.performance.boost.karma target_link_libraries(test.performance.boost.karma fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.performance.boost.karma PRIVATE diff --git a/test/performance/test.performance.decimal_integer/CMakeLists.txt b/test/performance/test.performance.decimal_integer/CMakeLists.txt index 4e2b964..4f58bb1 100644 --- a/test/performance/test.performance.decimal_integer/CMakeLists.txt +++ b/test/performance/test.performance.decimal_integer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.performance.decimal_integer target_link_libraries(test.performance.decimal_integer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.performance.decimal_integer PRIVATE diff --git a/test/performance/test.performance.hexadecimal_integer/CMakeLists.txt b/test/performance/test.performance.hexadecimal_integer/CMakeLists.txt index 0de8f0b..9862b7f 100644 --- a/test/performance/test.performance.hexadecimal_integer/CMakeLists.txt +++ b/test/performance/test.performance.hexadecimal_integer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.performance.hexadecimal_integer target_link_libraries(test.performance.hexadecimal_integer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.performance.hexadecimal_integer PRIVATE diff --git a/test/performance/test.performance.name_age_height/CMakeLists.txt b/test/performance/test.performance.name_age_height/CMakeLists.txt index cf45e2c..b456331 100644 --- a/test/performance/test.performance.name_age_height/CMakeLists.txt +++ b/test/performance/test.performance.name_age_height/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.performance.name_age_height target_link_libraries(test.performance.name_age_height fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.performance.name_age_height PRIVATE diff --git a/test/performance/test.performance.one_integer/CMakeLists.txt b/test/performance/test.performance.one_integer/CMakeLists.txt index e3c28db..db68b5a 100644 --- a/test/performance/test.performance.one_integer/CMakeLists.txt +++ b/test/performance/test.performance.one_integer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.performance.one_integer target_link_libraries(test.performance.one_integer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.performance.one_integer PRIVATE diff --git a/test/performance/test.performance.one_pointer/CMakeLists.txt b/test/performance/test.performance.one_pointer/CMakeLists.txt index 465985d..f793ec1 100644 --- a/test/performance/test.performance.one_pointer/CMakeLists.txt +++ b/test/performance/test.performance.one_pointer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.performance.one_pointer target_link_libraries(test.performance.one_pointer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.performance.one_pointer PRIVATE diff --git a/test/performance/test.performance.overload.ex.1/CMakeLists.txt b/test/performance/test.performance.overload.ex.1/CMakeLists.txt index dde391c..1cbba46 100644 --- a/test/performance/test.performance.overload.ex.1/CMakeLists.txt +++ b/test/performance/test.performance.overload.ex.1/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.performance.overload.ex.1 target_link_libraries(test.performance.overload.ex.1 fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.performance.overload.ex.1 PRIVATE diff --git a/test/performance/test.performance.scenario1/CMakeLists.txt b/test/performance/test.performance.scenario1/CMakeLists.txt index 16793cc..5668465 100644 --- a/test/performance/test.performance.scenario1/CMakeLists.txt +++ b/test/performance/test.performance.scenario1/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.performance.scenario1 target_link_libraries(test.performance.scenario1 fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.performance.scenario1 PRIVATE diff --git a/test/performance/test.performance.ten_strings_twice/CMakeLists.txt b/test/performance/test.performance.ten_strings_twice/CMakeLists.txt index 2b77a7d..f4bd028 100644 --- a/test/performance/test.performance.ten_strings_twice/CMakeLists.txt +++ b/test/performance/test.performance.ten_strings_twice/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.performance.ten_strings_twice target_link_libraries(test.performance.ten_strings_twice fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.performance.ten_strings_twice PRIVATE diff --git a/test/performance/test.performance.three_strings_one_integer/CMakeLists.txt b/test/performance/test.performance.three_strings_one_integer/CMakeLists.txt index 6a64614..20482a0 100644 --- a/test/performance/test.performance.three_strings_one_integer/CMakeLists.txt +++ b/test/performance/test.performance.three_strings_one_integer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.performance.three_strings_one_integer target_link_libraries(test.performance.three_strings_one_integer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.performance.three_strings_one_integer PRIVATE diff --git a/test/scratch/test.scratch.FILE/CMakeLists.txt b/test/scratch/test.scratch.FILE/CMakeLists.txt index 403e307..45e007b 100644 --- a/test/scratch/test.scratch.FILE/CMakeLists.txt +++ b/test/scratch/test.scratch.FILE/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.FILE target_link_libraries(test.scratch.FILE fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.FILE PRIVATE diff --git a/test/scratch/test.scratch.ff_test_1/CMakeLists.txt b/test/scratch/test.scratch.ff_test_1/CMakeLists.txt index bed6c10..d521c16 100644 --- a/test/scratch/test.scratch.ff_test_1/CMakeLists.txt +++ b/test/scratch/test.scratch.ff_test_1/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.ff_test_1 target_link_libraries(test.scratch.ff_test_1 fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.ff_test_1 PRIVATE diff --git a/test/scratch/test.scratch.format_alignment/CMakeLists.txt b/test/scratch/test.scratch.format_alignment/CMakeLists.txt index ee4e0bd..1d265b2 100644 --- a/test/scratch/test.scratch.format_alignment/CMakeLists.txt +++ b/test/scratch/test.scratch.format_alignment/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.format_alignment target_link_libraries(test.scratch.format_alignment fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.format_alignment PRIVATE diff --git a/test/scratch/test.scratch.format_defects/CMakeLists.txt b/test/scratch/test.scratch.format_defects/CMakeLists.txt index adc16ec..57d4cc1 100644 --- a/test/scratch/test.scratch.format_defects/CMakeLists.txt +++ b/test/scratch/test.scratch.format_defects/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.format_defects target_link_libraries(test.scratch.format_defects fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.format_defects PRIVATE diff --git a/test/scratch/test.scratch.format_iterator/CMakeLists.txt b/test/scratch/test.scratch.format_iterator/CMakeLists.txt index 5d0fbbc..7e76a52 100644 --- a/test/scratch/test.scratch.format_iterator/CMakeLists.txt +++ b/test/scratch/test.scratch.format_iterator/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.format_iterator target_link_libraries(test.scratch.format_iterator fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.format_iterator PRIVATE diff --git a/test/scratch/test.scratch.implicit_integer/CMakeLists.txt b/test/scratch/test.scratch.implicit_integer/CMakeLists.txt index 4839562..49dc7f1 100644 --- a/test/scratch/test.scratch.implicit_integer/CMakeLists.txt +++ b/test/scratch/test.scratch.implicit_integer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.implicit_integer target_link_libraries(test.scratch.implicit_integer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.implicit_integer PRIVATE diff --git a/test/scratch/test.scratch.inserter.integer/CMakeLists.txt b/test/scratch/test.scratch.inserter.integer/CMakeLists.txt index eb6be8f..b3630b8 100644 --- a/test/scratch/test.scratch.inserter.integer/CMakeLists.txt +++ b/test/scratch/test.scratch.inserter.integer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.inserter.integer target_link_libraries(test.scratch.inserter.integer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.inserter.integer PRIVATE diff --git a/test/scratch/test.scratch.inserter.real/CMakeLists.txt b/test/scratch/test.scratch.inserter.real/CMakeLists.txt index c586baa..7efda98 100644 --- a/test/scratch/test.scratch.inserter.real/CMakeLists.txt +++ b/test/scratch/test.scratch.inserter.real/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.inserter.real target_link_libraries(test.scratch.inserter.real fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.inserter.real PRIVATE diff --git a/test/scratch/test.scratch.overload.3.BSTR_out_parameter/CMakeLists.txt b/test/scratch/test.scratch.overload.3.BSTR_out_parameter/CMakeLists.txt index 04bb1f8..2fcb696 100644 --- a/test/scratch/test.scratch.overload.3.BSTR_out_parameter/CMakeLists.txt +++ b/test/scratch/test.scratch.overload.3.BSTR_out_parameter/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.overload.3.BSTR_out_parameter target_link_libraries(test.scratch.overload.3.BSTR_out_parameter fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.overload.3.BSTR_out_parameter PRIVATE diff --git a/test/scratch/test.scratch.sink.WindowsConsole/CMakeLists.txt b/test/scratch/test.scratch.sink.WindowsConsole/CMakeLists.txt index b751a49..084ea4e 100644 --- a/test/scratch/test.scratch.sink.WindowsConsole/CMakeLists.txt +++ b/test/scratch/test.scratch.sink.WindowsConsole/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.sink.WindowsConsole target_link_libraries(test.scratch.sink.WindowsConsole fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.sink.WindowsConsole PRIVATE diff --git a/test/scratch/test.scratch.sink.WindowsMessageBox/CMakeLists.txt b/test/scratch/test.scratch.sink.WindowsMessageBox/CMakeLists.txt index 2f8d28f..2510c8f 100644 --- a/test/scratch/test.scratch.sink.WindowsMessageBox/CMakeLists.txt +++ b/test/scratch/test.scratch.sink.WindowsMessageBox/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.sink.WindowsMessageBox target_link_libraries(test.scratch.sink.WindowsMessageBox fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.sink.WindowsMessageBox PRIVATE diff --git a/test/scratch/test.scratch.sink.auto_buffer/CMakeLists.txt b/test/scratch/test.scratch.sink.auto_buffer/CMakeLists.txt index cd850f7..94ddffd 100644 --- a/test/scratch/test.scratch.sink.auto_buffer/CMakeLists.txt +++ b/test/scratch/test.scratch.sink.auto_buffer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.sink.auto_buffer target_link_libraries(test.scratch.sink.auto_buffer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.sink.auto_buffer PRIVATE diff --git a/test/scratch/test.scratch.sink.vectored_file/CMakeLists.txt b/test/scratch/test.scratch.sink.vectored_file/CMakeLists.txt index a314981..b5827f3 100644 --- a/test/scratch/test.scratch.sink.vectored_file/CMakeLists.txt +++ b/test/scratch/test.scratch.sink.vectored_file/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.sink.vectored_file target_link_libraries(test.scratch.sink.vectored_file fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.sink.vectored_file PRIVATE diff --git a/test/scratch/test.scratch.sinks.shim_string/CMakeLists.txt b/test/scratch/test.scratch.sinks.shim_string/CMakeLists.txt index 927d7b2..c7f95f4 100644 --- a/test/scratch/test.scratch.sinks.shim_string/CMakeLists.txt +++ b/test/scratch/test.scratch.sinks.shim_string/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.sinks.shim_string target_link_libraries(test.scratch.sinks.shim_string fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.sinks.shim_string PRIVATE diff --git a/test/scratch/test.scratch.speech/CMakeLists.txt b/test/scratch/test.scratch.speech/CMakeLists.txt index ecfff70..c7b10e9 100644 --- a/test/scratch/test.scratch.speech/CMakeLists.txt +++ b/test/scratch/test.scratch.speech/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.scratch.speech target_link_libraries(test.scratch.speech fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.scratch.speech PRIVATE diff --git a/test/unit/test.unit.api.accum_slice_lens/CMakeLists.txt b/test/unit/test.unit.api.accum_slice_lens/CMakeLists.txt index 2d54ee4..f12797f 100644 --- a/test/unit/test.unit.api.accum_slice_lens/CMakeLists.txt +++ b/test/unit/test.unit.api.accum_slice_lens/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.api.accum_slice_lens target_link_libraries(test.unit.api.accum_slice_lens fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.api.accum_slice_lens PRIVATE diff --git a/test/unit/test.unit.api.crlf_for_platform/CMakeLists.txt b/test/unit/test.unit.api.crlf_for_platform/CMakeLists.txt index 9822a5d..1d295d6 100644 --- a/test/unit/test.unit.api.crlf_for_platform/CMakeLists.txt +++ b/test/unit/test.unit.api.crlf_for_platform/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.api.crlf_for_platform target_link_libraries(test.unit.api.crlf_for_platform fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.api.crlf_for_platform PRIVATE diff --git a/test/unit/test.unit.api.fill_replacements/CMakeLists.txt b/test/unit/test.unit.api.fill_replacements/CMakeLists.txt index b9ae610..5e61842 100644 --- a/test/unit/test.unit.api.fill_replacements/CMakeLists.txt +++ b/test/unit/test.unit.api.fill_replacements/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.api.fill_replacements target_link_libraries(test.unit.api.fill_replacements fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.api.fill_replacements PRIVATE diff --git a/test/unit/test.unit.api.illformed_handlers/CMakeLists.txt b/test/unit/test.unit.api.illformed_handlers/CMakeLists.txt index 8e6dc84..f2943f5 100644 --- a/test/unit/test.unit.api.illformed_handlers/CMakeLists.txt +++ b/test/unit/test.unit.api.illformed_handlers/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.api.illformed_handlers target_link_libraries(test.unit.api.illformed_handlers fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.api.illformed_handlers PRIVATE diff --git a/test/unit/test.unit.api.initialisation/CMakeLists.txt b/test/unit/test.unit.api.initialisation/CMakeLists.txt index bfce8a8..a390519 100644 --- a/test/unit/test.unit.api.initialisation/CMakeLists.txt +++ b/test/unit/test.unit.api.initialisation/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.api.initialisation target_link_libraries(test.unit.api.initialisation fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.api.initialisation PRIVATE diff --git a/test/unit/test.unit.api.lookup_pattern/CMakeLists.txt b/test/unit/test.unit.api.lookup_pattern/CMakeLists.txt index d21a2e0..7077f8d 100644 --- a/test/unit/test.unit.api.lookup_pattern/CMakeLists.txt +++ b/test/unit/test.unit.api.lookup_pattern/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.api.lookup_pattern target_link_libraries(test.unit.api.lookup_pattern fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.api.lookup_pattern PRIVATE diff --git a/test/unit/test.unit.api.mismatched_handlers/CMakeLists.txt b/test/unit/test.unit.api.mismatched_handlers/CMakeLists.txt index c4dab23..7d143bd 100644 --- a/test/unit/test.unit.api.mismatched_handlers/CMakeLists.txt +++ b/test/unit/test.unit.api.mismatched_handlers/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.api.mismatched_handlers target_link_libraries(test.unit.api.mismatched_handlers fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.api.mismatched_handlers PRIVATE diff --git a/test/unit/test.unit.api.parse_format/CMakeLists.txt b/test/unit/test.unit.api.parse_format/CMakeLists.txt index 927ba28..09507a9 100644 --- a/test/unit/test.unit.api.parse_format/CMakeLists.txt +++ b/test/unit/test.unit.api.parse_format/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.api.parse_format target_link_libraries(test.unit.api.parse_format fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.api.parse_format PRIVATE diff --git a/test/unit/test.unit.bundle.util/CMakeLists.txt b/test/unit/test.unit.bundle.util/CMakeLists.txt index e226211..6e822b1 100644 --- a/test/unit/test.unit.bundle.util/CMakeLists.txt +++ b/test/unit/test.unit.bundle.util/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.bundle.util target_link_libraries(test.unit.bundle.util fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.bundle.util PRIVATE diff --git a/test/unit/test.unit.bundle.winini/CMakeLists.txt b/test/unit/test.unit.bundle.winini/CMakeLists.txt index 1ed4317..fa4015b 100644 --- a/test/unit/test.unit.bundle.winini/CMakeLists.txt +++ b/test/unit/test.unit.bundle.winini/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.bundle.winini target_link_libraries(test.unit.bundle.winini fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.bundle.winini PRIVATE diff --git a/test/unit/test.unit.failure.mismatched.arguments/CMakeLists.txt b/test/unit/test.unit.failure.mismatched.arguments/CMakeLists.txt index 9238ce5..bff9c70 100644 --- a/test/unit/test.unit.failure.mismatched.arguments/CMakeLists.txt +++ b/test/unit/test.unit.failure.mismatched.arguments/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.failure.mismatched.arguments target_link_libraries(test.unit.failure.mismatched.arguments fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.failure.mismatched.arguments PRIVATE diff --git a/test/unit/test.unit.format.standard_flags/CMakeLists.txt b/test/unit/test.unit.format.standard_flags/CMakeLists.txt index 038d54c..66aa066 100644 --- a/test/unit/test.unit.format.standard_flags/CMakeLists.txt +++ b/test/unit/test.unit.format.standard_flags/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.format.standard_flags target_link_libraries(test.unit.format.standard_flags fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.format.standard_flags PRIVATE diff --git a/test/unit/test.unit.inserters.character/CMakeLists.txt b/test/unit/test.unit.inserters.character/CMakeLists.txt index a49260d..3069b3a 100644 --- a/test/unit/test.unit.inserters.character/CMakeLists.txt +++ b/test/unit/test.unit.inserters.character/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.inserters.character target_link_libraries(test.unit.inserters.character fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.inserters.character PRIVATE diff --git a/test/unit/test.unit.inserters.integer/CMakeLists.txt b/test/unit/test.unit.inserters.integer/CMakeLists.txt index 57e601a..1a07925 100644 --- a/test/unit/test.unit.inserters.integer/CMakeLists.txt +++ b/test/unit/test.unit.inserters.integer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.inserters.integer target_link_libraries(test.unit.inserters.integer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.inserters.integer PRIVATE diff --git a/test/unit/test.unit.shims.fast_integers/CMakeLists.txt b/test/unit/test.unit.shims.fast_integers/CMakeLists.txt index 8c63f9d..500c36f 100644 --- a/test/unit/test.unit.shims.fast_integers/CMakeLists.txt +++ b/test/unit/test.unit.shims.fast_integers/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.shims.fast_integers target_link_libraries(test.unit.shims.fast_integers fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.shims.fast_integers PRIVATE diff --git a/test/unit/test.unit.sink.CString/CMakeLists.txt b/test/unit/test.unit.sink.CString/CMakeLists.txt index 86d370a..e6a60fd 100644 --- a/test/unit/test.unit.sink.CString/CMakeLists.txt +++ b/test/unit/test.unit.sink.CString/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.sink.CString target_link_libraries(test.unit.sink.CString fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.sink.CString PRIVATE diff --git a/test/unit/test.unit.sink.OutputDebugString/CMakeLists.txt b/test/unit/test.unit.sink.OutputDebugString/CMakeLists.txt index 5dbb192..a6158b6 100644 --- a/test/unit/test.unit.sink.OutputDebugString/CMakeLists.txt +++ b/test/unit/test.unit.sink.OutputDebugString/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.sink.OutputDebugString target_link_libraries(test.unit.sink.OutputDebugString fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.sink.OutputDebugString PRIVATE diff --git a/test/unit/test.unit.sink.auto_buffer/CMakeLists.txt b/test/unit/test.unit.sink.auto_buffer/CMakeLists.txt index 247b57d..6b61324 100644 --- a/test/unit/test.unit.sink.auto_buffer/CMakeLists.txt +++ b/test/unit/test.unit.sink.auto_buffer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.sink.auto_buffer target_link_libraries(test.unit.sink.auto_buffer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.sink.auto_buffer PRIVATE diff --git a/test/unit/test.unit.sink.c_string/CMakeLists.txt b/test/unit/test.unit.sink.c_string/CMakeLists.txt index 591a0d4..1e406f4 100644 --- a/test/unit/test.unit.sink.c_string/CMakeLists.txt +++ b/test/unit/test.unit.sink.c_string/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.sink.c_string target_link_libraries(test.unit.sink.c_string fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.sink.c_string PRIVATE diff --git a/test/unit/test.unit.sink.char_buffer/CMakeLists.txt b/test/unit/test.unit.sink.char_buffer/CMakeLists.txt index 669e149..b10de42 100644 --- a/test/unit/test.unit.sink.char_buffer/CMakeLists.txt +++ b/test/unit/test.unit.sink.char_buffer/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.sink.char_buffer target_link_libraries(test.unit.sink.char_buffer fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.sink.char_buffer PRIVATE diff --git a/test/unit/test.unit.sink.null/CMakeLists.txt b/test/unit/test.unit.sink.null/CMakeLists.txt index 00e8f91..19497ba 100644 --- a/test/unit/test.unit.sink.null/CMakeLists.txt +++ b/test/unit/test.unit.sink.null/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.sink.null target_link_libraries(test.unit.sink.null fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.sink.null PRIVATE diff --git a/test/unit/test.unit.sink.ostream/CMakeLists.txt b/test/unit/test.unit.sink.ostream/CMakeLists.txt index 172aefa..89550e7 100644 --- a/test/unit/test.unit.sink.ostream/CMakeLists.txt +++ b/test/unit/test.unit.sink.ostream/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.sink.ostream target_link_libraries(test.unit.sink.ostream fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.sink.ostream PRIVATE diff --git a/test/unit/test.unit.sink.stringstream/CMakeLists.txt b/test/unit/test.unit.sink.stringstream/CMakeLists.txt index 8452a6f..1c14c0b 100644 --- a/test/unit/test.unit.sink.stringstream/CMakeLists.txt +++ b/test/unit/test.unit.sink.stringstream/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(test.unit.sink.stringstream target_link_libraries(test.unit.sink.stringstream fastformat - xTests::xTests.core + $,xTests::xTests.core,xTests::core> ) target_compile_options(test.unit.sink.stringstream PRIVATE From ad5524bb370975961d6be0318206f59d6fe05f1c Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 18 Sep 2026 06:44:39 +1000 Subject: [PATCH 13/17] chore(CMake files): SPACEs => TABs --- cmake/BuildType.cmake | 22 +++++++++++----------- cmake/LanguageFullVersion.cmake | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cmake/BuildType.cmake b/cmake/BuildType.cmake index 7a7b3e8..a2eaa0c 100644 --- a/cmake/BuildType.cmake +++ b/cmake/BuildType.cmake @@ -5,7 +5,7 @@ # Purpose: CMake module file (for BuildType) # # Created: 16th October 2019 -# Updated: 12th January 2024 +# Updated: 18th September 2026 # # ######################################################################## # @@ -37,24 +37,24 @@ include(BuildType) if(EXISTS "${CMAKE_SOURCE_DIR}/.git") - set(default_build_type "Debug") + set(default_build_type "Debug") else() - set(default_build_type "Release") + set(default_build_type "Release") endif() if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - message(STATUS "Setting build type to '${default_build_type}' as none was specified.") + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") - set(CACHE CMAKE_BUILD_TYPE "${default_build_type}" - STRING "Choose the type of build." FORCE - ) + set(CACHE CMAKE_BUILD_TYPE "${default_build_type}" + STRING "Choose the type of build." FORCE + ) - # Set the possible values of build type for cmake-gui - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Release" "MinSizeRel" "RelWithDebInfo" - ) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Release" "MinSizeRel" "RelWithDebInfo" + ) endif() diff --git a/cmake/LanguageFullVersion.cmake b/cmake/LanguageFullVersion.cmake index c0882b4..bf5e8e4 100644 --- a/cmake/LanguageFullVersion.cmake +++ b/cmake/LanguageFullVersion.cmake @@ -7,22 +7,22 @@ set(X_CMAKE_C_FULLSTANDARD 0) if(FALSE) elseif(CMAKE_C_STANDARD EQUAL 99) - set(X_CMAKE_C_FULLSTANDARD 1999) + set(X_CMAKE_C_FULLSTANDARD 1999) elseif(CMAKE_C_STANDARD EQUAL 90) - set(X_CMAKE_C_FULLSTANDARD 1990) + set(X_CMAKE_C_FULLSTANDARD 1990) elseif(CMAKE_C_STANDARD GREATER_EQUAL 23) - set(X_CMAKE_C_FULLSTANDARD 2023) + set(X_CMAKE_C_FULLSTANDARD 2023) elseif(CMAKE_C_STANDARD GREATER_EQUAL 17) - set(X_CMAKE_C_FULLSTANDARD 2017) + set(X_CMAKE_C_FULLSTANDARD 2017) elseif(CMAKE_C_STANDARD GREATER_EQUAL 11) - set(X_CMAKE_C_FULLSTANDARD 2011) + set(X_CMAKE_C_FULLSTANDARD 2011) else() - message(FATAL_ERROR "mechanism for discriminating X_CMAKE_C_FULLSTANDARD has failed") + message(FATAL_ERROR "mechanism for discriminating X_CMAKE_C_FULLSTANDARD has failed") endif() From a20fc11487d384667875f57816251f971af32f5a Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 18 Sep 2026 07:15:20 +1000 Subject: [PATCH 14/17] fix(fastformat): adapt tests to string_view without c_str() Pass file_lines entries to xTests via string-access shims instead of .c_str(); replace sprintf with bounded snprintf (and %.*s where views lack c_str) in performance harnesses. --- .../test.component.FILE.cpp | 12 +++++----- .../test.component.FILE_stream.cpp | 12 +++++----- .../test.component.sink.ostream.cpp | 22 +++++++++---------- .../test.component.sink.string.fmt.cpp | 12 ++++++---- .../test.performance.name_age_height.cpp | 12 +++++----- .../test.performance.one_integer.cpp | 16 +++++++------- .../test.performance.one_pointer.cpp | 12 +++++----- .../test.performance.overload.ex.1.cpp | 16 +++++++------- .../test.performance.scenario1.cpp | 16 +++++++------- .../test.performance.ten_strings_twice.cpp | 22 +++++++++---------- ....performance.three_strings_one_integer.cpp | 12 +++++----- 11 files changed, 84 insertions(+), 80 deletions(-) diff --git a/test/component/test.component.FILE/test.component.FILE.cpp b/test/component/test.component.FILE/test.component.FILE.cpp index 3c521f2..f89e96c 100644 --- a/test/component/test.component.FILE/test.component.FILE.cpp +++ b/test/component/test.component.FILE/test.component.FILE.cpp @@ -4,7 +4,7 @@ * Purpose: Implementation file for the test.component.FILE project. * * Created: 3rd January 2008 - * Updated: 6th February 2024 + * Updated: 18th September 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -132,7 +132,7 @@ static void test_1_1() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0]); ::remove(FILE_NAME); } @@ -160,7 +160,7 @@ static void test_1_2() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0]); ::remove(FILE_NAME); } @@ -189,7 +189,7 @@ static void test_1_3() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abcdef", lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abcdef", lines[0]); ::remove(FILE_NAME); } @@ -218,8 +218,8 @@ static void test_1_4() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(2u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0].c_str()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("def", lines[1].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0]); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("def", lines[1]); ::remove(FILE_NAME); } diff --git a/test/component/test.component.FILE_stream/test.component.FILE_stream.cpp b/test/component/test.component.FILE_stream/test.component.FILE_stream.cpp index 5cc86b1..51fc0d6 100644 --- a/test/component/test.component.FILE_stream/test.component.FILE_stream.cpp +++ b/test/component/test.component.FILE_stream/test.component.FILE_stream.cpp @@ -4,7 +4,7 @@ * Purpose: Implementation file for the test.component.FILE_stream project. * * Created: 3rd January 2008 - * Updated: 6th February 2024 + * Updated: 18th September 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -152,7 +152,7 @@ static void test_1_1() file_lines_t lines(t); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("abc"), lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("abc"), lines[0]); } static void test_1_2() @@ -168,7 +168,7 @@ static void test_1_2() file_lines_t lines(t); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("abc"), lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("abc"), lines[0]); } static void test_1_3() @@ -185,7 +185,7 @@ static void test_1_3() file_lines_t lines(t); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("abcdef"), lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("abcdef"), lines[0]); } static void test_1_4() @@ -202,8 +202,8 @@ static void test_1_4() file_lines_t lines(t); XTESTS_REQUIRE(XTESTS_TEST_INTEGER_EQUAL(2u, lines.size())); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("abc"), lines[0].c_str()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("def"), lines[1].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("abc"), lines[0]); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("def"), lines[1]); } static void test_1_5() diff --git a/test/component/test.component.sink.ostream/test.component.sink.ostream.cpp b/test/component/test.component.sink.ostream/test.component.sink.ostream.cpp index 82a974a..77bf0ba 100644 --- a/test/component/test.component.sink.ostream/test.component.sink.ostream.cpp +++ b/test/component/test.component.sink.ostream/test.component.sink.ostream.cpp @@ -4,7 +4,7 @@ * Purpose: Implementation file for the test.component.sink.ostream project. * * Created: 14th September 2010 - * Updated: 6th February 2024 + * Updated: 18th September 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -126,7 +126,7 @@ static void test_1_1() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0]); ::remove(FILE_NAME); } @@ -156,7 +156,7 @@ static void test_1_2() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0]); ::remove(FILE_NAME); } @@ -187,7 +187,7 @@ static void test_1_3() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abcdef", lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abcdef", lines[0]); ::remove(FILE_NAME); } @@ -218,8 +218,8 @@ static void test_1_4() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(2u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0].c_str()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("def", lines[1].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0]); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("def", lines[1]); ::remove(FILE_NAME); } @@ -249,7 +249,7 @@ static void test_1_5() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0]); ::remove(FILE_NAME); } @@ -279,7 +279,7 @@ static void test_1_6() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0]); ::remove(FILE_NAME); } @@ -310,7 +310,7 @@ static void test_1_7() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(1u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abcdef", lines[0].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abcdef", lines[0]); ::remove(FILE_NAME); } @@ -341,8 +341,8 @@ static void test_1_8() platformstl::file_lines lines(FILE_NAME); XTESTS_TEST_INTEGER_EQUAL(2u, lines.size()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0].c_str()); - XTESTS_TEST_MULTIBYTE_STRING_EQUAL("def", lines[1].c_str()); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("abc", lines[0]); + XTESTS_TEST_MULTIBYTE_STRING_EQUAL("def", lines[1]); ::remove(FILE_NAME); } diff --git a/test/component/test.component.sink.string.fmt/test.component.sink.string.fmt.cpp b/test/component/test.component.sink.string.fmt/test.component.sink.string.fmt.cpp index 7a5cfdd..68e0410 100644 --- a/test/component/test.component.sink.string.fmt/test.component.sink.string.fmt.cpp +++ b/test/component/test.component.sink.string.fmt/test.component.sink.string.fmt.cpp @@ -1,10 +1,10 @@ /* ///////////////////////////////////////////////////////////////////////// - * File: test.component.sink.string.fmt.cpp + * File: test.component.sink.string.fmt.cpp * - * Purpose: Implementation file for the test.component.sink.string.fmt project. + * Purpose: Implementation file for the test.component.sink.string.fmt project. * - * Created: 19th December 2007 - * Updated: 6th February 2024 + * Created: 19th December 2007 + * Updated: 18th September 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -15,6 +15,10 @@ #include +#if 1 +# include +#endif + /* FastFormat header files */ #include diff --git a/test/performance/test.performance.name_age_height/test.performance.name_age_height.cpp b/test/performance/test.performance.name_age_height/test.performance.name_age_height.cpp index edbd04c..1d41498 100644 --- a/test/performance/test.performance.name_age_height/test.performance.name_age_height.cpp +++ b/test/performance/test.performance.name_age_height/test.performance.name_age_height.cpp @@ -1,10 +1,10 @@ /* ///////////////////////////////////////////////////////////////////////////// - * File: test.performance.name_age_height.cpp + * File: test.performance.name_age_height.cpp * - * Purpose: Implementation file for the test.performance.name_age_height project. + * Purpose: Implementation file for the test.performance.name_age_height project. * - * Created: 19th September 2006 - * Updated: 6th February 2024 + * Created: 19th September 2006 + * Updated: 18th September 2026 * * ////////////////////////////////////////////////////////////////////////// */ @@ -46,7 +46,7 @@ # include # include - namespace + namespace { char s_realBuffer[1001]; } @@ -346,7 +346,7 @@ static int main_(int argc, char** argv) { for(unsigned k = 0; k != STLSOFT_NUM_ELEMENTS(args); ++k) { char sz[1001]; - int cch = ::sprintf(&sz[0], "%s, %d, %g", args[k].name, args[k].age, args[k].height); + int cch = ::snprintf(&sz[0], STLSOFT_NUM_ELEMENTS(sz), "%s, %d, %g", args[k].name, args[k].age, args[k].height); std::string s(sz, size_t(cch)); diff --git a/test/performance/test.performance.one_integer/test.performance.one_integer.cpp b/test/performance/test.performance.one_integer/test.performance.one_integer.cpp index 53b6465..2097f6c 100644 --- a/test/performance/test.performance.one_integer/test.performance.one_integer.cpp +++ b/test/performance/test.performance.one_integer/test.performance.one_integer.cpp @@ -1,10 +1,10 @@ /* ///////////////////////////////////////////////////////////////////////////// - * File: test.performance.one_integer.cpp + * File: test.performance.one_integer.cpp * - * Purpose: Implementation file for the test.performance.one_integer project. + * Purpose: Implementation file for the test.performance.one_integer project. * - * Created: 9th September 2006 - * Updated: 6th February 2024 + * Created: 9th September 2006 + * Updated: 18th September 2026 * * ////////////////////////////////////////////////////////////////////////// */ @@ -49,7 +49,7 @@ # include # include - namespace + namespace { char s_realBuffer[1001]; } @@ -703,9 +703,9 @@ int main(int argc, char *argv[]) static std::string with_Streams(int value) { - char num[21]; + char num[21]; - return std::string(num, size_t(::sprintf(&num[0], "%d", value))); + return std::string(num, size_t(::snprintf(&num[0], STLSOFT_NUM_ELEMENTS(num), "%d", value))); } static std::string with_IOStreams(int value) @@ -766,7 +766,7 @@ static std::string with_STLSoftI2S(int value) static CString with_MFC(int value) { CString str; - + str.Format(TEXT("%d"), value); return str; diff --git a/test/performance/test.performance.one_pointer/test.performance.one_pointer.cpp b/test/performance/test.performance.one_pointer/test.performance.one_pointer.cpp index 6812ce2..0502f72 100644 --- a/test/performance/test.performance.one_pointer/test.performance.one_pointer.cpp +++ b/test/performance/test.performance.one_pointer/test.performance.one_pointer.cpp @@ -1,10 +1,10 @@ /* ///////////////////////////////////////////////////////////////////////////// - * File: test.performance.one_pointer.cpp + * File: test.performance.one_pointer.cpp * - * Purpose: Implementation file for the test.performance.one_pointer project. + * Purpose: Implementation file for the test.performance.one_pointer project. * - * Created: 19th September 2006 - * Updated: 6th February 2024 + * Created: 19th September 2006 + * Updated: 18th September 2026 * * ////////////////////////////////////////////////////////////////////////// */ @@ -46,7 +46,7 @@ # include # include - namespace + namespace { char s_realBuffer[1001]; } @@ -351,7 +351,7 @@ static int main_(int argc, char** argv) { for(unsigned k = 0; k != STLSOFT_NUM_ELEMENTS(args); ++k) { char sz[21]; - int cch = ::sprintf(&sz[0], "%p", args[k]); + int cch = ::snprintf(&sz[0], STLSOFT_NUM_ELEMENTS(sz), "%p", args[k]); std::string s(sz, size_t(cch)); diff --git a/test/performance/test.performance.overload.ex.1/test.performance.overload.ex.1.cpp b/test/performance/test.performance.overload.ex.1/test.performance.overload.ex.1.cpp index e81eb94..658a24d 100644 --- a/test/performance/test.performance.overload.ex.1/test.performance.overload.ex.1.cpp +++ b/test/performance/test.performance.overload.ex.1/test.performance.overload.ex.1.cpp @@ -1,10 +1,10 @@ /* ///////////////////////////////////////////////////////////////////////////// - * File: test.performance.overload.ex.1.cpp + * File: test.performance.overload.ex.1.cpp * - * Purpose: Implementation file for the test.performance.overload.ex.1 project. + * Purpose: Implementation file for the test.performance.overload.ex.1 project. * - * Created: 19th October 2008 - * Updated: 6th February 2024 + * Created: 19th October 2008 + * Updated: 18th September 2026 * * ////////////////////////////////////////////////////////////////////////// */ @@ -46,7 +46,7 @@ # include # include - namespace + namespace { char s_realBuffer[1001]; } @@ -348,13 +348,13 @@ static int main_(int argc, char** argv) stlsoft::auto_buffer buff(total); #ifdef FASTFORMAT_USE_WIDE_STRINGS - int r = ::wsprintf(&buff[0], TX("My name is %s %s; I am %d years old; call me %s") + int r = ::wsnprintf(&buff[0], buff.size(), TX("My name is %s %s; I am %d years old; call me %s") #else /* ? FASTFORMAT_USE_WIDE_STRINGS */ - int r = ::sprintf(&buff[0], "My name is %s %s; I am %d years old; call me %s" + int r = ::snprintf(&buff[0], buff.size(), "My name is %s %s; I am %d years old; call me %s" #endif /* FASTFORMAT_USE_WIDE_STRINGS */ , forename.c_str(), surname, age, forename.c_str()); - // TODO: handle r < 0 + // TODO: handle r < 0 #ifdef FASTFORMAT_USE_WIDE_STRINGS std::wstring s(buff.data(), size_t(r)); diff --git a/test/performance/test.performance.scenario1/test.performance.scenario1.cpp b/test/performance/test.performance.scenario1/test.performance.scenario1.cpp index 07f93e4..c20cf8a 100644 --- a/test/performance/test.performance.scenario1/test.performance.scenario1.cpp +++ b/test/performance/test.performance.scenario1/test.performance.scenario1.cpp @@ -1,10 +1,10 @@ /* ///////////////////////////////////////////////////////////////////////////// - * File: test.performance.scenario1.cpp + * File: test.performance.scenario1.cpp * - * Purpose: Implementation file for the test.performance.scenario1 project. + * Purpose: Implementation file for the test.performance.scenario1 project. * - * Created: 19th September 2006 - * Updated: 6th February 2024 + * Created: 19th September 2006 + * Updated: 18th September 2026 * * ////////////////////////////////////////////////////////////////////////// */ @@ -46,7 +46,7 @@ # include # include - namespace + namespace { char s_realBuffer[1001]; } @@ -376,13 +376,13 @@ static int main_(int argc, char** argv) { char sz[1001]; #if defined(PERF_TEST_USE_4_PARAMS_3_STR_1_INT) - int cch = ::sprintf(&sz[0], "The first param '%s', and the second '%s', and the first again '%s'. Then the third '%s'. Finally, the last '%d'" + int cch = ::snprintf(&sz[0], STLSOFT_NUM_ELEMENTS(sz), "The first param '%s', and the second '%s', and the first again '%s'. Then the third '%s'. Finally, the last '%d'" , stlsoft::c_str_ptr(arg0), arg1, stlsoft::c_str_ptr(arg0), stlsoft::c_str_ptr(arg2), arg3); #elif defined(PERF_TEST_USE_3_PARAMS) - int cch = ::sprintf(&sz[0], "The first param '%s', and the second '%s', and the first again '%s'. Finally, the third '%s'" + int cch = ::snprintf(&sz[0], STLSOFT_NUM_ELEMENTS(sz), "The first param '%s', and the second '%s', and the first again '%s'. Finally, the third '%s'" , stlsoft::c_str_ptr(arg0), arg1, stlsoft::c_str_ptr(arg0), stlsoft::c_str_ptr(arg2)); #else /* ? PERF_TEST_USE_3_PARAMS */ - int cch = ::sprintf(&sz[0], "The first param '%s', and the second '%s', and the first again '%s'" + int cch = ::snprintf(&sz[0], STLSOFT_NUM_ELEMENTS(sz), "The first param '%s', and the second '%s', and the first again '%s'" , stlsoft::c_str_ptr(arg0), arg1, stlsoft::c_str_ptr(arg0)); #endif /* !PERF_TEST_USE_3_PARAMS */ diff --git a/test/performance/test.performance.ten_strings_twice/test.performance.ten_strings_twice.cpp b/test/performance/test.performance.ten_strings_twice/test.performance.ten_strings_twice.cpp index 79e6441..31533c2 100644 --- a/test/performance/test.performance.ten_strings_twice/test.performance.ten_strings_twice.cpp +++ b/test/performance/test.performance.ten_strings_twice/test.performance.ten_strings_twice.cpp @@ -1,10 +1,10 @@ /* ///////////////////////////////////////////////////////////////////////////// - * File: test.performance.ten_strings_twice.cpp + * File: test.performance.ten_strings_twice.cpp * - * Purpose: Implementation file for the test.performance.ten_strings_twice project. + * Purpose: Implementation file for the test.performance.ten_strings_twice project. * - * Created: 19th September 2006 - * Updated: 6th February 2024 + * Created: 19th September 2006 + * Updated: 18th September 2026 * * ////////////////////////////////////////////////////////////////////////// */ @@ -46,7 +46,7 @@ # include # include - namespace + namespace { char s_realBuffer[1001]; } @@ -314,9 +314,9 @@ static int main_(int argc, char** argv) { CString s; - s.Format(TX("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s") - , arg0.c_str(), arg1, arg2.c_str(), arg3.c_str(), arg4.c_str(), arg5.c_str(), arg6, arg7.c_str(), arg8.c_str(), arg9.c_str() - , arg0.c_str(), arg1, arg2.c_str(), arg3.c_str(), arg4.c_str(), arg5.c_str(), arg6, arg7.c_str(), arg8.c_str(), arg9.c_str()); + s.Format(TX("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%.*s%s%.*s") + , arg0.c_str(), arg1, arg2.c_str(), arg3.c_str(), arg4.c_str(), arg5.c_str(), arg6, int(arg7.size()), arg7.data(), arg8.c_str(), int(arg9.size()), arg9.data() + , arg0.c_str(), arg1, arg2.c_str(), arg3.c_str(), arg4.c_str(), arg5.c_str(), arg6, int(arg7.size()), arg7.data(), arg8.c_str(), int(arg9.size()), arg9.data()); #ifdef SHOW_FIRST_RESULT (0 == i) && fprintf(stderr, "%.*s\n", int(s.GetLength()), static_cast(s)); @@ -346,9 +346,9 @@ static int main_(int argc, char** argv) { for(unsigned i = 0; i < ITERATIONS; ++i) { char sz[10001]; - int cch = ::sprintf(&sz[0], TX("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s") - , arg0.c_str(), arg1, arg2.c_str(), arg3.c_str(), arg4.c_str(), arg5.c_str(), arg6, arg7.c_str(), arg8.c_str(), arg9.c_str() - , arg0.c_str(), arg1, arg2.c_str(), arg3.c_str(), arg4.c_str(), arg5.c_str(), arg6, arg7.c_str(), arg8.c_str(), arg9.c_str()); + int cch = ::snprintf(&sz[0], STLSOFT_NUM_ELEMENTS(sz), TX("%s%s%s%s%s%s%s%.*s%s%.*s%s%s%s%s%s%s%s%.*s%s%.*s") + , arg0.c_str(), arg1, arg2.c_str(), arg3.c_str(), arg4.c_str(), arg5.c_str(), arg6, int(arg7.size()), arg7.data(), arg8.c_str(), int(arg9.size()), arg9.data() + , arg0.c_str(), arg1, arg2.c_str(), arg3.c_str(), arg4.c_str(), arg5.c_str(), arg6, int(arg7.size()), arg7.data(), arg8.c_str(), int(arg9.size()), arg9.data()); std::string s(sz, size_t(cch)); diff --git a/test/performance/test.performance.three_strings_one_integer/test.performance.three_strings_one_integer.cpp b/test/performance/test.performance.three_strings_one_integer/test.performance.three_strings_one_integer.cpp index 95ecfe5..3f63a7a 100644 --- a/test/performance/test.performance.three_strings_one_integer/test.performance.three_strings_one_integer.cpp +++ b/test/performance/test.performance.three_strings_one_integer/test.performance.three_strings_one_integer.cpp @@ -1,10 +1,10 @@ /* ///////////////////////////////////////////////////////////////////////////// - * File: test.performance.three_strings_one_integer.cpp + * File: test.performance.three_strings_one_integer.cpp * - * Purpose: Implementation file for the test.performance.three_strings_one_integer project. + * Purpose: Implementation file for the test.performance.three_strings_one_integer project. * - * Created: 19th September 2006 - * Updated: 6th February 2024 + * Created: 19th September 2006 + * Updated: 18th September 2026 * * ////////////////////////////////////////////////////////////////////////// */ @@ -46,7 +46,7 @@ # include # include - namespace + namespace { char s_realBuffer[1001]; } @@ -342,7 +342,7 @@ static int main_(int argc, char** argv) { for(unsigned i = 0; i < ITERATIONS; ++i) { char sz[1001]; - int cch = ::sprintf(&sz[0], "The first param '%s', and the second '%s', and the first again '%s'. Then the third '%s'. Finally, the last '%d'" + int cch = ::snprintf(&sz[0], STLSOFT_NUM_ELEMENTS(sz), "The first param '%s', and the second '%s', and the first again '%s'. Then the third '%s'. Finally, the last '%d'" , stlsoft::c_str_ptr(arg0), arg1, stlsoft::c_str_ptr(arg0), stlsoft::c_str_ptr(arg2), arg3); std::string s(sz, size_t(cch)); From 64633a380eaf8a18722a2da48937b717bad3147c Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 18 Sep 2026 07:21:59 +1000 Subject: [PATCH 15/17] chore(fastformat): add scratch versions and modernise build helpers Bring helper scripts and scratch coverage in line with Synesis boilerplate: - modernise build_cmake.sh for .sis project identity, SIS_CMAKE_* overrides, and optional target lists; - add run_all_scratch_tests.sh; - add test.scratch.versions reporting FASTFORMAT_VER and _STLSOFT_VER; --- build_cmake.sh | 102 +++++++++++----- run_all_scratch_tests.sh | 170 +++++++++++++++++++++++++++ test/scratch/CMakeLists.txt | 1 + test/scratch/versions/CMakeLists.txt | 12 ++ test/scratch/versions/main.cpp | 92 +++++++++++++++ 5 files changed, 348 insertions(+), 29 deletions(-) create mode 100755 run_all_scratch_tests.sh create mode 100644 test/scratch/versions/CMakeLists.txt create mode 100644 test/scratch/versions/main.cpp diff --git a/build_cmake.sh b/build_cmake.sh index f347e52..f575833 100755 --- a/build_cmake.sh +++ b/build_cmake.sh @@ -3,19 +3,55 @@ ScriptPath=$0 Dir=$(cd $(dirname "$ScriptPath"); pwd) Basename=$(basename "$ScriptPath") -CMakePath=$Dir/_build +CMakeDir=${SIS_CMAKE_BUILD_DIR:-$Dir/_build} +[[ -n "$MSYSTEM" ]] && DefaultMakeCmd=mingw32-make.exe || DefaultMakeCmd=make +MakeCmd=${SIS_CMAKE_MAKE_COMMAND:-${SIS_CMAKE_COMMAND:-$DefaultMakeCmd}} +ProjectNameFile="$Dir/.sis/project_name.txt" +ProjectName=$(tr -d '[:space:]' < "$ProjectNameFile") + +IgnoreRemainingFlagsAndOptions=0 +Targets=() + + +# ########################################################## +# functions + +function join_by { local IFS="$1"; shift; echo "$*"; } # ########################################################## # command-line handling while [[ $# -gt 0 ]]; do - case $1 in - --help) - cat << EOF -FastFormat is very fast and very robust C++ formatting library -Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems -Copyright (c) 2006-2019, Matthew Wilson and Synesis Software + + if [ $IgnoreRemainingFlagsAndOptions -ne 0 ]; then + + Targets+=($1) + + shift + + continue + else + + if [ ! ${1:0:1} = '-' ]; then + + Targets+=($1) + + shift + + continue + fi + fi + + case $1 in + --) + + IgnoreRemainingFlagsAndOptions=1 + ;; + --help) + + [ -f "$Dir/.sis/script_info_lines.txt" ] && cat "$Dir/.sis/script_info_lines.txt" + cat << EOF Executes CMake-generated artefacts to (re)build project $ScriptPath [ ... flags/options ... ] @@ -32,48 +68,56 @@ Flags/options: EOF - exit 0 - ;; - *) - >&2 echo "$ScriptPath: unrecognised argument '$1'; use --help for usage" + exit 0 + ;; + *) - exit 1 - ;; - esac + >&2 echo "$ScriptPath: unrecognised argument '$1'; use --help for usage" - shift + exit 1 + ;; + esac + + shift done # ########################################################## # main() -if [ ! -d "$CMakePath" ]; then +if [ ! -d "$CMakeDir" ]; then - >&2 echo "$ScriptPath: CMake build directory '$CMakePath' not found so nothing to do; use script 'prepare_cmake.sh' if you wish to prepare CMake artefacts" + >&2 echo "$ScriptPath: CMake build directory '$CMakeDir' not found so nothing to do; use script 'prepare_cmake.sh' if you wish to prepare CMake artefacts" - exit 1 + exit 1 else - cd $CMakePath + cd $CMakeDir - if [ ! -f "$CMakePath/Makefile" ]; then + if [ ! -f "$CMakeDir/Makefile" ]; then - >&2 echo "$ScriptPath: CMake build directory '$CMakePath' does not contain expected file 'Makefile', so a clean cannot be performed. It is recommended that you remove all CMake artefacts using script 'remove_cmake_artefacts.sh' followed by regeneration via 'prepare_cmake.sh'" + >&2 echo "$ScriptPath: CMake build directory '$CMakeDir' does not contain expected file 'Makefile', so a clean cannot be performed. It is recommended that you remove all CMake artefacts using script 'remove_cmake_artefacts.sh' followed by regeneration via 'prepare_cmake.sh'" - exit 1 - else - - echo "Executing build (via command \`make\`)" + cd ->/dev/null - make + exit 1 + else - status=$? + if [ -z "$Targets" ]; then - cd ->/dev/null + echo "Executing build for ${ProjectName} (via command \`$MakeCmd\`)" + else - exit $status + echo "Executing build for ${ProjectName} (via command \`$MakeCmd\`) with specific target(s) $(join_by , "${Targets[@]}")" fi + + $MakeCmd ${Targets[*]} + status=$? + + cd ->/dev/null + + exit $status + fi fi diff --git a/run_all_scratch_tests.sh b/run_all_scratch_tests.sh new file mode 100755 index 0000000..a22a672 --- /dev/null +++ b/run_all_scratch_tests.sh @@ -0,0 +1,170 @@ +#! /bin/bash + +ScriptPath=$0 +Dir=$(cd $(dirname "$ScriptPath"); pwd) +Basename=$(basename "$ScriptPath") +CMakeDir=${SIS_CMAKE_BUILD_DIR:-$Dir/_build} +[[ -n "$MSYSTEM" ]] && DefaultMakeCmd=mingw32-make.exe || DefaultMakeCmd=make +MakeCmd=${SIS_CMAKE_MAKE_COMMAND:-${SIS_CMAKE_COMMAND:-$DefaultMakeCmd}} +ProjectNameFile="$Dir/.sis/project_name.txt" +ProjectName=$(tr -d '[:space:]' < "$ProjectNameFile") + +ListOnly=0 +RunMake=1 +Verbosity=${XTESTS_VERBOSITY:-${TEST_VERBOSITY:-3}} + + +# ########################################################## +# colours + +if command -v tput > /dev/null; then + + RbEnvClr_Blue=${FG_BLUE:-$(tput setaf 4)} + RbEnvClr_Red=${FG_BLUE:-$(tput setaf 1)} + RbEnvClr_Bold=${FD_BOLD:-$(tput bold)} + RbEnvClr_None=${FD_NONE:-$(tput sgr0)} +else + + RbEnvClr_Blue= + RbEnvClr_Red= + RbEnvClr_Bold= + RbEnvClr_None= +fi + + +# ########################################################## +# command-line handling + +while [[ $# -gt 0 ]]; do + + case $1 in + --list-only|-l) + + ListOnly=1 + ;; + --no-make|-M) + + RunMake=0 + ;; + --verbosity) + + shift + Verbosity=$1 + ;; + --help) + + [ -f "$Dir/.sis/script_info_lines.txt" ] && cat "$Dir/.sis/script_info_lines.txt" + cat << EOF +Runs all (matching) performance-test and scratch-test programs + +$ScriptPath [ ... flags/options ... ] + +Flags/options: + + behaviour: + + -l + --list-only + lists the target programs but does not execute them + + -M + --no-make + does not execute CMake and make before running tests + + --verbosity + specifies an explicit verbosity for the unit-test(s) + + + standard flags: + + --help + displays this help and terminates + +EOF + + exit 0 + ;; + *) + + >&2 echo "$ScriptPath: unrecognised argument '$1'; use --help for usage" + + exit 1 + ;; + esac + + shift +done + + +# ########################################################## +# main() + +status=0 + +if [ $RunMake -ne 0 ]; then + + if [ $ListOnly -eq 0 ]; then + + echo "Executing build (via command \`$MakeCmd\`) and then running all ${ProjectName} scratch (and performance) test programs" + + mkdir -p $CMakeDir || exit 1 + + cd $CMakeDir + + $MakeCmd + status=$? + + cd ->/dev/null + fi +else + + if [ ! -d "$CMakeDir" ] || [ ! -f "$CMakeDir/CMakeCache.txt" ] || [ ! -d "$CMakeDir/CMakeFiles" ]; then + + >&2 echo "$ScriptPath: cannot run in '--no-make' mode without a previous successful build step" + fi +fi + +if [ $status -eq 0 ]; then + + if [ $ListOnly -ne 0 ]; then + + echo "Listing all ${ProjectName} scratch (and performance) test programs" + else + + echo "Running all ${ProjectName} scratch (and performance) test programs" + fi + + for f in $(find $CMakeDir -type f '(' -name 'test_scratch*' -o -name 'test.scratch.*' -o -name 'test_performance*' -o -name 'test.performance.*' ')' -exec test -x {} \; -print) + do + + if [ $ListOnly -ne 0 ]; then + + echo "would execute $RbEnvClr_Blue$RbEnvClr_Bold$f$RbEnvClr_None:" + + continue + fi + + if [ $Verbosity -ge 3 ]; then + + echo + fi + if [ $Verbosity -ge 2 ]; then + + echo "executing $RbEnvClr_Blue$RbEnvClr_Bold$f$RbEnvClr_None:" + fi + + if $f; then + + : + else + + status=$? + fi + done +fi + +exit $status + + +# ############################## end of file ############################# # + diff --git a/test/scratch/CMakeLists.txt b/test/scratch/CMakeLists.txt index a2d4e4a..1641c8c 100644 --- a/test/scratch/CMakeLists.txt +++ b/test/scratch/CMakeLists.txt @@ -31,6 +31,7 @@ if(_BUILD_AS_WIN32) add_subdirectory(test.scratch.speech) endif(_BUILD_AS_WIN32) +add_subdirectory(versions) # ############################## end of file ############################# # diff --git a/test/scratch/versions/CMakeLists.txt b/test/scratch/versions/CMakeLists.txt new file mode 100644 index 0000000..f19f9fc --- /dev/null +++ b/test/scratch/versions/CMakeLists.txt @@ -0,0 +1,12 @@ + +add_executable(test.scratch.versions + main.cpp +) + +target_link_libraries(test.scratch.versions + PRIVATE + fastformat +) + + +# ############################## end of file ############################# # diff --git a/test/scratch/versions/main.cpp b/test/scratch/versions/main.cpp new file mode 100644 index 0000000..bcf7923 --- /dev/null +++ b/test/scratch/versions/main.cpp @@ -0,0 +1,92 @@ +/* ///////////////////////////////////////////////////////////////////////// + * File: test/scratch/versions/main.cpp + * + * Purpose: Lists composite version macros for FastFormat and its + * dependencies. + * + * Created: 17th September 2026 + * Updated: 18th September 2026 + * + * ////////////////////////////////////////////////////////////////////// */ + + +/* ///////////////////////////////////////////////////////////////////////// + * includes + */ + +#include + +#include + +#include +#include + +#include + + +/* ///////////////////////////////////////////////////////////////////////// + * helpers + */ + +template< + typename T_stream +, typename T_integer +> +void +version( + T_stream& stm +, char const* prefix +, char const* libname +, char const* macroname +, T_integer libver +) +{ + stm + << prefix + << libname + << ": v" + << ((libver >> 24) & 0xff) + << '.' + << ((libver >> 16) & 0xff) + << '.' + << ((libver >> 8) & 0xff) + << '.' + << ((libver >> 0) & 0xff) + << " (" + << macroname + << " = 0x" + << std::hex << std::setfill('0') << std::setw(8) + << static_cast(libver) + << std::dec + << ")" + << std::endl + ; +} + + +/* ///////////////////////////////////////////////////////////////////////// + * main() + */ + +int main(int /* argc */, char* /* argv */[]) +{ + { + unsigned const libver = FASTFORMAT_VER; + + version(std::cout, "", "FastFormat", "FASTFORMAT_VER", libver); + } + + std::cout << "\n" << "efferent dependencies:" << std::endl; + + { + unsigned const libver = _STLSOFT_VER; + + version(std::cout, "\t", "STLSoft", "_STLSOFT_VER", libver); + } + + return EXIT_SUCCESS; +} + + +/* ///////////////////////////// end of file //////////////////////////// */ + From 2ede2c9c61bc5e5b9a855b25fc8e1cfe64ef310b Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Tue, 22 Sep 2026 05:09:54 +1000 Subject: [PATCH 16/17] .gitattributes --- .gitattributes | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.gitattributes b/.gitattributes index 76a2f86..1ad0590 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,6 +3,11 @@ # Sources: GitHub Docs (line endings), git-scm gitattributes (diff=cpp), # gitattributes/gitattributes C++.gitattributes + Common.gitattributes, # github-linguist overrides. +# +# Linguist language-bar policy (Synesis): classify public C API headers as C +# and *.cmake as CMake scripts; keep helper scripts, IDE project files, and +# CMakeLists.txt config out of the advertised language mix. Prefer +# -linguist-detectable over linguist-detectable=false. # Default: detect text, normalize to LF in the repository * text=auto @@ -97,3 +102,25 @@ TODO text # --- GitHub Linguist --- **/build/** linguist-generated **/cmake-build-*/** linguist-generated + +# Classification (C-primary / C API with C++ tests; *.cmake as CMake scripts) +*.c linguist-language=C +*.cmake linguist-language=CMake +*.cpp linguist-language=C++ +*.cxx linguist-language=C++ +*.h linguist-language=C +*.hpp linguist-language=C++ +*.hxx linguist-language=C++ + +# Keep the bar on library languages (helpers / legacy IDE / docs / +# CMakeLists.txt config; leave *.cmake detectable as CMake) +*.cmd -linguist-detectable +*.dsp -linguist-detectable +*.dsw -linguist-detectable +*.html -linguist-detectable +*.sh -linguist-detectable +*.sln -linguist-detectable +*.vcxproj -linguist-detectable +*.vimrc -linguist-detectable +CMakeLists.txt -linguist-detectable +makefile -linguist-detectable From 94421cb73710c91e3064e8548c5e16a9d9e06595 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Tue, 22 Sep 2026 09:02:35 +1000 Subject: [PATCH 17/17] fix(c-cpp): quote Dir resolution in CMake helper scripts Use Dir=$(cd "$(dirname "$ScriptPath")" && pwd) so paths with spaces resolve reliably; apply the same one-line fix across in-wave helper scripts (prepare/build/clean/ctest/remove and run_all_*). --- build_cmake.sh | 2 +- clean_cmake.sh | 2 +- prepare_cmake.sh | 2 +- remove_cmake_artefacts.sh | 2 +- run_all_scratch_tests.sh | 2 +- run_all_unit_tests.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build_cmake.sh b/build_cmake.sh index f575833..2177c38 100755 --- a/build_cmake.sh +++ b/build_cmake.sh @@ -1,7 +1,7 @@ #! /bin/bash ScriptPath=$0 -Dir=$(cd $(dirname "$ScriptPath"); pwd) +Dir=$(cd "$(dirname "$ScriptPath")" && pwd) Basename=$(basename "$ScriptPath") CMakeDir=${SIS_CMAKE_BUILD_DIR:-$Dir/_build} [[ -n "$MSYSTEM" ]] && DefaultMakeCmd=mingw32-make.exe || DefaultMakeCmd=make diff --git a/clean_cmake.sh b/clean_cmake.sh index 27b934f..2c0801f 100755 --- a/clean_cmake.sh +++ b/clean_cmake.sh @@ -1,7 +1,7 @@ #! /bin/bash ScriptPath=$0 -Dir=$(cd $(dirname "$ScriptPath"); pwd) +Dir=$(cd "$(dirname "$ScriptPath")" && pwd) Basename=$(basename "$ScriptPath") CMakePath=$Dir/_build diff --git a/prepare_cmake.sh b/prepare_cmake.sh index 455fc97..04e17e9 100755 --- a/prepare_cmake.sh +++ b/prepare_cmake.sh @@ -1,7 +1,7 @@ #! /bin/bash ScriptPath=$0 -Dir=$(cd $(dirname "$ScriptPath"); pwd) +Dir=$(cd "$(dirname "$ScriptPath")" && pwd) Basename=$(basename "$ScriptPath") CMakePath=$Dir/_build diff --git a/remove_cmake_artefacts.sh b/remove_cmake_artefacts.sh index 10746a1..926fdf1 100755 --- a/remove_cmake_artefacts.sh +++ b/remove_cmake_artefacts.sh @@ -1,7 +1,7 @@ #! /bin/bash ScriptPath=$0 -Dir=$(cd $(dirname "$ScriptPath"); pwd) +Dir=$(cd "$(dirname "$ScriptPath")" && pwd) Basename=$(basename "$ScriptPath") CMakePath=$Dir/_build diff --git a/run_all_scratch_tests.sh b/run_all_scratch_tests.sh index a22a672..37a68e9 100755 --- a/run_all_scratch_tests.sh +++ b/run_all_scratch_tests.sh @@ -1,7 +1,7 @@ #! /bin/bash ScriptPath=$0 -Dir=$(cd $(dirname "$ScriptPath"); pwd) +Dir=$(cd "$(dirname "$ScriptPath")" && pwd) Basename=$(basename "$ScriptPath") CMakeDir=${SIS_CMAKE_BUILD_DIR:-$Dir/_build} [[ -n "$MSYSTEM" ]] && DefaultMakeCmd=mingw32-make.exe || DefaultMakeCmd=make diff --git a/run_all_unit_tests.sh b/run_all_unit_tests.sh index b002430..8be28f9 100755 --- a/run_all_unit_tests.sh +++ b/run_all_unit_tests.sh @@ -1,7 +1,7 @@ #! /bin/bash ScriptPath=$0 -Dir=$(cd $(dirname "$ScriptPath"); pwd) +Dir=$(cd "$(dirname "$ScriptPath")" && pwd) Basename=$(basename "$ScriptPath") CMakePath=$Dir/_build