Commit Graph

1191 Commits

Author SHA1 Message Date
Martchus 909346c199 Fix reserving size for error message in `charToDigit()` 2024-02-27 02:16:52 +01:00
Martchus c9cd44ceee Apply clang-format 2024-02-22 19:41:29 +01:00
Martchus a43affa81a Avoid `global.h` changing depending on target prefix/suffix
Just using the project name should be sufficient and this avoid `global.h`
from changing when a different target prefix/suffix is used.
2024-02-22 19:41:15 +01:00
Martchus d8e144d312 Optimize `numberToString()`
This function is slower than it needs to be due to the expensive inserts at
the front of the string. The new version is 38 times faster for a 9-digit
number using GCC 13.2 with full optimizations according to Quick Bench.
2024-02-21 21:21:11 +01:00
Martchus a337452179 Fix typo in README 2024-02-16 17:42:15 +01:00
Martchus 6cb0e63921 Avoid warnings about unused return values by MSVC 2024-02-15 18:40:44 +01:00
Martchus a4625b8e34 Bump patch version 2024-02-15 18:40:11 +01:00
Martchus a4be8a56d1 Avoid problems with CppUnit's macros when doing unity builds 2024-02-04 20:56:27 +01:00
Martchus ce31de2c6f Fix tests when making a unity build
The formatting for chrono types needs to be included before CppUnit
headers. This change makes sure of that by simply including that header via
`tests/testutils.h`. The `chrono/format.h` header is not big (including the
header it includes) so this should not be a big deal.
2024-01-30 23:08:14 +01:00
Martchus bc00bdcdc9 Apply cmake-format 2024-01-30 22:38:52 +01:00
Martchus 57579f0164 Add preset for unity builds
This is not working for most of my projects due to conflicting macros.
2024-01-30 22:38:39 +01:00
Martchus a7fdc1af1b Allow writing public compile definitions to a header file
This is useful as it makes consuming libraries less dependent on using the
CMake module or pkg-config file correctly. This should especially decrease
the likelihood of running into linker errors when consuming a static build
of the libraries where e.g. `CPP_UTILITIES_STATIC` needs to be defined.
2024-01-30 22:13:25 +01:00
Martchus 27043d2be0 Fix typo in comment 2024-01-30 00:44:54 +01:00
Martchus b526d79eaf Always use a process group in helper for involing test applications
So far only the implementation using Boost.Process was using a process
group; with this change also the implementation using POSIX APIs uses a
process group. This way the code can wait until all sub processes have
terminated.
2024-01-28 21:55:13 +01:00
Martchus 995c315377 Allow semicolons in categories and additional entries for desktop file
Pass these variables as multi-value arguments to get more than just the
part before the first semicolon.
2024-01-27 02:54:27 +01:00
Martchus d08794b11d Allow setting `DESKTOP_FILE_ADDITIONAL_ENTRIES` manually 2024-01-27 02:51:41 +01:00
Martchus 1a0c4fbce0 Update copyright date 2024-01-23 00:25:55 +01:00
Martchus c25a3c9c9a Improve error handling when launching test process
* Use `EXIT_FAILURE` instead of an arbitrary exit status
* Print the error message
2024-01-20 17:38:14 +01:00
Martchus c9dea06cfe Remove outdated remarks about `execApp()` and similar test helpers
These functions are supported also on other platforms via Boost.Process.
2024-01-20 17:35:17 +01:00
Martchus ad686a1be7 Bump patch version 2024-01-20 17:33:47 +01:00
Martchus 85c76708c9 Mention setting GOROOT for building with MSYS2 mingw-w64 packaging 2024-01-02 15:32:14 +01:00
Martchus c17c8e7815 Set `GOROOT` for `x64-windows-static` preset in accordance with `GO_BIN`
Unfortunately the final linking still doesn't work due to conflicting
symbols (and using the ucrt64 version doesn't change that).
2023-12-30 19:34:22 +01:00
Martchus f97320816a Change Bash completion code for dirs/files to new coding style 2023-12-29 16:34:26 +01:00
Martchus 6f924da4f0 Make code for processing escaping in Bash completion more generic 2023-12-29 16:30:55 +01:00
Martchus b3b7166812 Fix bash completion when path contains round brackets 2023-12-29 16:09:55 +01:00
Martchus 8bffc93316 Improve instructions about building on Windows 2023-12-25 00:56:50 +01:00
Martchus 456bbfc54e Avoid hardcoding the versioned subdirectory within `WIN_KITS_ROOT` 2023-12-25 00:56:50 +01:00
Martchus b0be8817ad Bump patch version 2023-12-25 00:56:50 +01:00
Martchus d8605b50b0 Ensure `chars_format` is defined for older versions of libstdc++
Versions older than 10 don't even define this enum class. Note that libc++
always seems to define it even though it doesn't implement the FP overloads
at all at this point.

By the way, this means the minimum GCC version is 8 and the minimum libc++
version is 7 because for this code to work the `charconv` header still
needs to be present at all.
2023-12-11 19:59:46 +01:00
Martchus 1264a7e9c5 Remove no longer used include in `chrono/timespan.cpp` 2023-12-08 16:24:04 +01:00
Martchus b8dff49c01 Add missing include for `std::array`
See https://github.com/Martchus/cpp-utilities/issues/29
2023-12-07 10:44:27 +01:00
Martchus dd0ea1d348 Use workaround for unavailable `std::from_chars()` also under older libstdc++ versions 2023-12-06 22:34:33 +01:00
Martchus 21f32d318b Bump patch version 2023-12-06 22:32:28 +01:00
Martchus 8d460380f1 Apply cmake-format 2023-12-05 11:42:42 +01:00
Martchus fbb1d73779 Apply clang-format 2023-12-05 11:42:26 +01:00
Martchus 35f56d486c Fix enabling AppStream tests 2023-11-30 19:44:08 +01:00
Martchus 9d8f897972 Add presets for compiling with clang++ and libc++ 2023-11-25 23:18:50 +01:00
Martchus 55146db7e1 Add workaround for missing FP overload for `std::from_chars()` in libc++ 2023-11-25 23:18:30 +01:00
Martchus fdfe8f154c Fix warnings in code of `TimeSpan::fromString()` 2023-11-25 23:15:29 +01:00
Martchus b1f89d78c3 Allow building without CppUnit-based tests 2023-11-25 23:14:36 +01:00
Martchus 3649782c8c Update README section about dependencies 2023-11-23 20:29:43 +01:00
Martchus 905f81c8b7 Improve remark in README about disabling native file buffer 2023-11-23 20:26:14 +01:00
Martchus 7bed9cd38c Remove TODOs about parsing/printing custom formats
It makes likely more sense to implement that entirely in user code. The
parsing/printing functions for common formats have also been improved so
this is likely not very relevant anymore anyways.
2023-11-23 20:24:44 +01:00
Martchus 11de58141b Support units in `TimeSpan::fromString()` 2023-11-23 20:20:07 +01:00
Martchus a425363eac Improve `TimeSpan::fromString()`
* Avoid heap allocation and counting separators
* Avoid code repetition
* Throw an exception if too many parts are present (as the documentation
  suggests this function would do)
* Allow emptry separators as this seems useful
2023-11-23 18:48:48 +01:00
Martchus 8fb7de6fe0 Enable AppStream tests only by default via `ENABLE_DEVEL_DEFAULTS`
This test already fails on deprecations so it is likely not a good idea to
run it in general as it would cause needless failures.
2023-11-22 12:59:40 +01:00
Martchus a1bed55eda Enable tidy tests only by default via `ENABLE_DEVEL_DEFAULTS`
This test is only relevant for development. Additionally, the behavior of
clang-format differs slightly between versions so this can really cause
needlessly failures.
2023-11-22 12:57:59 +01:00
Martchus 05570c5c71 Improve status messages about CXX11-ABI 2023-11-22 12:54:04 +01:00
Martchus cc6576c417 Bump patch version 2023-11-22 12:51:07 +01:00
Martchus ac35a5fad1 Fix a few Doxygen warnings 2023-11-18 22:32:04 +01:00