Commit Graph

989 Commits

Author SHA1 Message Date
Martchus 639018285d Fix typos 2022-06-26 11:48:44 +02:00
Martchus 8f4ca38c69 Update documentation of argument parser 2022-06-26 11:45:13 +02:00
Martchus 3c769fa242 Add greedy-flag for argument parser
This is useful if one needs to pass subsequent arguments as-is to another
nested argument parser.
2022-06-26 11:24:36 +02:00
Martchus 08194f5d32 Bump minor version 2022-06-26 11:19:03 +02:00
Martchus 3444e4bbb1 Improve argument parser tests
* Use auto
* Use `CPPUNIT_ASSERT_EQUAL` with `std::string_view` instead of `strcmp`
  for better error messages in case of a failure
* Avoid instantiating an `std::string` in checks using `std::string_view`
  instead
2022-06-26 11:18:36 +02:00
Martchus b1b811c57f Apply clang-format 2022-06-26 11:04:23 +02:00
Martchus 9e036a3f72 Allow enabling virtual terminal processing under Windows
* or disable use of ANSI-escape codes if not possible
* See https://github.com/Martchus/syncthingtray/issues/132
2022-06-07 16:46:54 +02:00
Martchus cf510f0397 Use macros from cstdlib instead of hard-coding exit codes 2022-05-21 12:37:36 +02:00
Martchus c931e2d928 Fix missing `#pragma GCC diagnostic push` 2022-05-21 12:13:01 +02:00
Martchus 7555e6854b Add test helper to use std::optional via CPPUNIT_ASSERT_EQUAL 2022-05-15 02:18:07 +02:00
Martchus c1152ca062 Ignore warning about possible null pointer dereferences appearing with GCC 12
Not sure why this warning is occurring but it is likely incorrect
2022-05-12 20:31:05 +02:00
Martchus f46855b130 Bump patch version 2022-05-12 20:09:06 +02:00
Martchus 24709861e2 Add stalebot config 2022-04-12 01:02:00 +02:00
Martchus c1e93738b6 Fix condition for avoiding `-static` flag
There's no `LINUX`; I suppose `UNIX` is specific enough as well.
2022-04-05 22:10:16 +02:00
Martchus 910432df4c Add copyright notice 2022-04-05 20:09:16 +02:00
Martchus 58c3506ca0 Add opt-out for enforcing static linkage (when generally aiming for static linkage) 2022-04-03 00:51:33 +02:00
Martchus 28a35e9673 Remove project name from headers dir if it already starts with it
This is useful if the repo contains headers in a directory called like the
project itself and should not have any effect on other projects.
2022-03-22 22:02:50 +01:00
Martchus f88ca7d16d Silence warning about type conversion in test helper
It is a possibly lossy conversion but good enough for a test helper.
2022-03-20 16:56:11 +01:00
Martchus 052f8d2bd2 Add helper to make native path from internal representaton 2022-03-17 22:31:11 +01:00
Martchus d4cf030ed9 Clarify that license is "GPL-2-or-later" 2022-03-15 21:29:10 +01:00
Martchus 3d59664021 Add `std::string_view` overloads to certain I/O functions 2022-03-04 21:04:22 +01:00
Martchus 77c353fb6c Add `TickType` and integer overloads to chrono utilities 2022-02-15 23:01:25 +01:00
Martchus a8fddad804 Add WorkingCopyMode::Cleanup 2022-01-08 23:35:01 +01:00
Martchus ef37ae437c Fix compile error with Clang related to diagnostic pragma
Fix
```
pragma diagnostic pop could not pop, no matching push
```

The GCC documentation says "If a pop has no matching push, the
command-line options are restored." but that's apparently not working here.
2021-12-20 22:46:38 +01:00
Martchus f81607be82 Possibly avoid ambiguous function call in conversion tests
This might avoid
```
/Users/oldfaithful/Local/tageditor/cpp-utilities/tests/conversiontests.cpp:29:15: error: call to 'swapOrder' is ambiguous static_assert(swapOrder(0xABCDEF1234567890ul) == 0x9078563412EFCDABul, "swapOrder(uint64)");
```

reported by https://github.com/Martchus/cpp-utilities/issues/22
2021-12-12 22:58:01 +01:00
Martchus b30028984a Ignore warning about possible null pointer dereference 2021-12-11 23:58:51 +01:00
Martchus 3b0ed313bc Avoid warning about using uninitialized variable 2021-12-11 23:58:51 +01:00
Martchus 6c7e8ae735 Avoid warning about out of bounds array access 2021-12-11 23:58:51 +01:00
Martchus 4f89aa3b53 Bump patch version 2021-12-11 23:58:51 +01:00
Martchus f20ea87f32 Fix using arguments in `configure_test_target` 2021-11-02 17:49:28 +01:00
Martchus 9cbff29c9e Fix passing application path when invoking tests
We need to pass the application's path here; not the path of the test
itself.
2021-11-02 17:48:09 +01:00
Martchus 11574209b3 Add experimental support for generating coverage report via gcc/gcov/lcov 2021-11-01 18:20:51 +01:00
Martchus 37c2b920d0 Remove obsolete check when configuring coverage with Clang
Building shared and static libraries at the same time has been removed as
of version 5 so this message would never be printed and it is not clear
anymore what the actual problem was.
2021-11-01 14:10:22 +01:00
Martchus 5563776061 Expose test name (created via `TestTarget.cmake`) for fixing downstream bug
This allows to set test properties in other projects as needed to fix
https://github.com/Martchus/syncthingtray/issues/116.
2021-10-12 23:38:54 +02:00
Martchus 5509caff89 Remove unused `META_CONFIG_PREFIX`
This variable was never actually used. I suppose I've been adding it for
places where the config should be added as a prefix. However, this would be
inconsistent and now would also mean a confusing overlap with the
namespacing feature. So let's just remove it.
2021-10-03 23:11:14 +02:00
Martchus 072b7b5136 Apply cmake-format 2021-10-03 23:06:20 +02:00
Martchus 347e283e8b
Merge pull request #21 from hrittich/upstream-patches
Fix namespace for file names
2021-10-03 19:48:57 +02:00
Hannah Rittich b8eee6d9d6 Fix namespace for file names 2021-10-03 02:13:27 +02:00
Martchus 2fc54ecdaa
Merge pull request #20 from hrittich/tmp
Allow configuration name as prefix
2021-10-02 21:58:07 +02:00
Hannah Rittich 3730830880 Added namespace for file names 2021-10-02 21:08:10 +02:00
Martchus a9e3d37681 Document `TLS_SUPPORT` and `META_TLS_PLUGINS` variables 2021-10-02 20:21:15 +02:00
Martchus 9c9a47e551 Define `QT_STATICPLUGIN` when building static Qt plugins
This requirement is documented here:
https://doc.qt.io/qt-5/plugins-howto.html#creating-static-plugins
2021-09-16 18:36:35 +02:00
Martchus 030e6a2034 Source required packages before adding target
The config script for adding the target (which is generated
by CMake) otherwise complains that referenced dependencies
are missing. Not sure why this was never a problem. Maybe
the packages were just present anyways or CMake added
additional checks at some point.
2021-09-16 01:06:35 +02:00
Martchus 3a52ae5e22 Prevent attempt to strip import lib for static plugin 2021-09-16 01:05:41 +02:00
Martchus 48c7906bf6 Do not export include dirs for plugins
Plugins don't have headers and the non-existant
include directory leads otherwise to configuration
errors when trying to link against a static plugin.
2021-09-16 01:04:19 +02:00
Martchus 18295c98ec Fix exporting list of required CMake packages 2021-09-11 21:31:17 +02:00
Martchus 6d0148e2c3 Allow overriding BUILD_SHARED_LIBS via a project-specific cache variable 2021-09-11 17:07:43 +02:00
Martchus af0294f0fb Apply cmake-format 2021-08-25 19:38:52 +02:00
Martchus 1b6ffb561a Fix locating files which are directly under the data dir (and not in the cmake dir) 2021-08-25 19:38:43 +02:00
Martchus 643112931c Fix wrong usage of `APPEND` when marking Windows resource file as generated 2021-08-25 00:56:04 +02:00