Commit Graph

1131 Commits

Author SHA1 Message Date
Martchus 053ac7e1ad Disable KDE integrations in `devel-qt6` preset, enable then only in `debug-kde`
Since the required KDE packages haven't been released yet it makes sense to
avoid enabling them for now in the generic preset for Qt 6.
2023-09-04 20:29:10 +02:00
Martchus 035a448da0 Avoid clazy warning about `decodeBase64`
The warning is about invalid memory usage within the loop in
case `strSize` is zero. It is supposedly not correct because
then the loop would never be entered anyways in that case.
However, it is likely nevertheless a good idea to silence the
warning.
2023-09-01 17:21:18 +02:00
Martchus 8d28ab70b3 Use `std::` consistently in `decodeBase64` 2023-09-01 17:18:39 +02:00
Martchus 132d25fbb1 Apply clang-format 2023-08-20 20:29:54 +02:00
Martchus 0349037711 Fix passing non-ASCII arguments in `execApp()` under Windows 2023-08-19 00:11:06 +02:00
Martchus af200403de Support `execApp()` test helper under Windows as well via Boost.Process 2023-08-18 22:57:54 +02:00
Martchus 18d92fee40 Fix typo in CLI wrapper code 2023-08-18 22:55:42 +02:00
Martchus 3bca5c224d Document how to build/install projects individually under Windows 2023-08-18 12:04:26 +02:00
Martchus 6660ff7eca Improve section about building on Windows via MSYS2
* Make it clear where to find the "Building this straight" section
* Give more details about reducing the list of dependencies to be
  installed
2023-08-17 00:15:22 +02:00
Martchus 2137568ad8 Remove debugging leftover in IO tests 2023-08-09 01:26:23 +02:00
Martchus 6a8431da0a Fix missing closing bracket in README 2023-08-09 01:25:55 +02:00
Martchus c4024ce00e Avoid CMake deprecation warning by bumping version 2023-07-23 21:18:25 +02:00
Martchus 7bcc66be0d Avoid warning "current scope has no parent" 2023-07-06 00:50:45 +02:00
Martchus 5ebbd0eb3f Improve logic for finding CppUnit
* Avoid forcefully setting cache variables; use a normal variable
  instead
* Use the imported target generated from the pkg-config which hopefully
  works better than using the variables directly
* Avoid warning when the find module was used; this is the case for
  vcpkg and there the provided CppUnit library is good enough
2023-07-05 14:18:32 +02:00
Martchus 04682d4601 Bump patch version 2023-07-05 14:17:59 +02:00
Martchus 6826546196 Improve documentation for namespace/config build variables
See https://github.com/Martchus/cpp-utilities/issues/25
2023-06-21 12:16:13 +02:00
Martchus 08a1c5c2eb Close output stream in IO tests before re-opening 2023-06-20 14:03:36 +02:00
Martchus 9191117120 Fix binary conversion functions for big endian systems
The code was broken on big endian systems by
07e9546855. When doing an explicit swap
one must distinguish the endianness the code runs on.
2023-06-20 14:03:36 +02:00
Martchus 30cefc2fd3 Add version details to config header 2023-06-17 22:53:48 +02:00
Martchus 38541f4c60 Bump minor version 2023-06-17 22:46:55 +02:00
Martchus 831c083e5f Add flags for static linkage when building CLI wrapper as well
Otherwise the wrapper might depend on `libgcc` or `libstdc++` on builds
that link against these libraries otherwise statically. Not sure why this
is only an issue on 32-bit builds. (The different exeption handling can
only explain `libgcc` but not `libstdc++`.)
2023-06-10 18:29:18 +02:00
Martchus dd95310c73 Suppress warning about implicit sign conversions
The conversion from unsigned int to int should be ok here.
2023-06-10 18:14:06 +02:00
Martchus fc651c71ff Improve build instructions further
* Avoid mentioning setting for library suffix as this most likely does not
  need manual tweaking anymore anyways
* Add a few additional remarks
* Use a simpler example for CMake presets and document special presets only
  in a further section
* Mention how to build on Windows via MSYS2 mingw64 (and not *only* via
  MSVC which is definitely more complicated)
2023-06-10 18:12:28 +02:00
Martchus 3bec473775 Enable clang-format and cmake-format only by default if present
Enabling both depending on `ENABLE_DEVEL_DEFAULTS` limits the usefulness of
`ENABLE_DEVEL_DEFAULTS` because it can then only be used of both tools are
installed (and especially `cmake-format` might not be installed). It makes
more sense to simply enable those targets depending on whether the tools
are installed or not. If they are explicitly enabled it is still a hard
error if the tools cannot be found.
2023-06-10 16:41:07 +02:00
Martchus c111d9f374 Clear Vulkan path in MSVC preset
I don't need it currently for my projects and it gets accidentally set to
the mingw-w64 include path which is wrong for a MSVC build.
2023-06-08 14:24:05 +02:00
Martchus 0057e49a0d Fix linking against static OpenSSL on GNU/Linux
Judging by the code the CMake find module actually attempts to cover this
case but it doesn't seem to work in practice - at least not when there are
only static libs and thus we find those static libs without explicitly
specifying `OPENSSL_USE_STATIC_LIBS`.
2023-06-07 23:58:49 +02:00
Martchus cfe67a1078 Bump patch version 2023-06-07 21:50:41 +02:00
Martchus 66b6fff0f2 Fix greediness of greedy arguments if they have sub arguments
Even sub arguments (e.g. `--help`) should be treated as values to be passed
to a nested argument parser (as documented). The sub arguments are only
added in this case to appear in the help.
2023-05-29 18:09:34 +02:00
Martchus 5bfce4235e Fix typo 2023-05-29 18:05:11 +02:00
Martchus 5d5ccb7729 Add further debugging presets and set KF6 prefix for Qt 6 presets 2023-05-21 20:08:31 +02:00
Martchus b9097a3750 Add GO_BIN to MSVC preset for libsyncthing 2023-05-16 21:50:14 +02:00
Martchus a19ee41a39 Apply cmake-format and clang-format 2023-05-16 21:39:10 +02:00
Martchus 0341316b4b Fix warning from MSVC about data loss 2023-05-10 22:06:59 +02:00
Martchus 0d0685d4c7 Simplify workaround for starting console and CLI-wrapper
* Disable workaround by default; with the CLI-wrapper available it makes no
  sense to run this code unnecassarily when the main executable is invoked
    * Remove check for Mintty; with the workaround disabled by default it
      is no longer necassary to avoid it
* Simplify the CLI-wrapper to rely on main application for enabling UTF-8
  and virtual terminal processing as it relies on it for attaching to the
  parent's console anyways
2023-05-09 00:16:28 +02:00
Martchus c6396f92fc Ignore warnings for use of legacy CRT functions when compiling with MSVC for now
There's no warning about these when compiling for other targets so let's
ignore them for now.
2023-05-07 21:52:06 +02:00
Martchus c60584e122 Allow compilation of Windows resource file when using MSVC as well 2023-05-07 21:34:46 +02:00
Martchus f3cb406ebe Add CLI-wrapper for Windows
Starting the console from a GUI application is not working very
well - so let's just provide a 2nd executable for the CLI. It
will be a simple console application that merely invokes the main
application passing all standard I/O. Unfortunately this does not
mean the existing hacks can be removed. Without them the wrapper
still doesn't get any I/O from the GUI application.
2023-05-07 21:32:21 +02:00
Martchus caace3ac63 Improve workaround for starting console from GUI app
It is still not perfect but now at least:

* Redirections to a file and pipes are no longer broken with `cmd.exe`
* Pipes are no longer broken in PowerShell
* It works at all when using MSVC
* The whole workaround is skipped for Mintty (as it is not needed at all)
* Sending a return key to the terminal in the end has been removed as it
  caused more harm than good in certain terminals and did not work in
  terminals other than `cmd.exe` anyways
2023-05-07 20:39:22 +02:00
Martchus 5e325d0b92 Avoid unqualified call to `std::move` 2023-05-05 01:06:06 +02:00
Martchus 5425488421 Fix preset for debug build with MSVC
* The preset must inherit from "debug" first so the build type is
  not overridden
* Use the debug library of cppunit
* Avoid configuring ccache which is not generally used under
  Windows
2023-05-01 19:25:18 +02:00
Martchus cb5ca77658 Improve test helper for launching an app
* Add helper that allows to specify the exit code (in case a non-zero
  exit code is actually expected)
* Use the proper macros to inspect the status returned by `waitpid()` to
  print/check the exit status correctly
2023-04-29 13:06:31 +02:00
Martchus 93a632e831 Bump minor version 2023-04-29 12:53:46 +02:00
Martchus ad39cbd604 Apply clang-format 2023-04-29 12:53:18 +02:00
Martchus e8b4279062 Don't use sendfile64() if input and output are the same to avoid EBADF
This does not work and leads to sendfile64() running into EBADF ("Bad file
descriptor").
2023-04-23 21:21:32 +02:00
Martchus a55a3604bd Fallback from sendfile64() in case of ENOSYS as well
As suggested on https://man7.org/linux/man-pages/man2/sendfile.2.html.
2023-04-23 21:04:31 +02:00
Martchus da91e54ec7 Disable use of sendfile64() by default
When changing tagparser to actually make use of the overloads
that use sendfile64() it breaks with "Bad file descriptor". So
better disable this until it has been better tested.
2023-04-23 20:51:33 +02:00
Martchus 83025c17a1 Fallback to unoptimized version if sendfile64() fails
It might fail on some filesystems such as `ecryptfs`, see
https://github.com/Martchus/cpp-utilities/issues/24.
2023-04-23 19:38:56 +02:00
Martchus 2467c4f815 Make use of platform-specific APIs for optimizing CopyHelper configurable
There might be unexpected limitations like
https://github.com/Martchus/cpp-utilities/issues/24. To be able to at least
workaround those limitations it makes sense to allow disabling the
optimization completely.
2023-04-23 19:23:47 +02:00
Martchus 10a7e4d814 Bump patch version 2023-04-06 18:09:42 +02:00
Martchus 59896da087
Merge pull request #23 from ahesford/minimalism
Fix use of `sendfile()` on 32-bit systems
2023-04-06 18:06:59 +02:00