Commit Graph

976 Commits

Author SHA1 Message Date
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
Martchus 9b293ab5d5 Document recently introduced CMake variables 2021-08-21 23:39:35 +02:00
Martchus f55dc67a93 Fix `option(BUILD_SHARED_LIBS …)`
* Fix order of arguments
* Keep building static libraries by default to stick with CMake's default
  except when devel defaults are enabled and we're targeting GNU/Linux
2021-08-21 23:39:17 +02:00
Martchus c2ab0d8e29 Document `CMAKE_FIND_DEBUG_MODE` 2021-08-07 17:09:24 +02:00
Martchus 15fddad46d Log error when "srcdirref" cannot be opened 2021-08-03 14:05:33 +02:00
Martchus 8961cf3a32 Add `META_TIDY_EXCLUDE_REGEX` to exclude files from tidy target
This can be useful to exclude 3rd party files.
2021-08-02 16:49:37 +02:00
Martchus 2de07d4cd0 Consider `*.cc` and `*.hh` files formatable 2021-08-02 16:48:35 +02:00
Martchus b16fff4b0a Test splitString*() with an empty input 2021-07-24 23:38:44 +02:00
Martchus 203679bf32 Document that delimiter for splitString*() must not be empty 2021-07-24 23:38:12 +02:00
Martchus 2bb04c64ea Use std::string_view::value_type in BufferSearch 2021-07-16 15:58:40 +02:00
Martchus 77b2c3281f Add overload to BufferSearch required by arch-repo-manager 2021-07-16 15:56:28 +02:00
Martchus 6558ff487a Add BufferSearch (from arch-repo-manager) to use it in syncthingtray as well 2021-07-15 02:24:28 +02:00
Martchus db87472be9 Unify and improve code for finding OpenSSL
* Unify code for use_openssl and use_crypto
* Make missing OpenSSL targets a fatal error if OpenSSL is required
* Add note that possibly the devel package is missing
    * Under Tumbleweed with missing devel package I've got `OpenSSL_FOUND`
      but no imported targets because the symlink from the devel package
      was missing. This might be due to stale values within the CMake
      cache.
2021-07-07 20:51:57 +02:00
Martchus eace9b44ec Fix linking statically against OpenSSL
`set(… PARENT_SCOPE)` leaves the current scope unaffected so appending the
static dependencies removed the OpenSSL libs themselves again.
2021-07-06 20:02:49 +02:00