Commit Graph

967 Commits

Author SHA1 Message Date
Martchus e1313c77a0 Add test for fileName() without parent directories 2020-04-11 21:44:07 +02:00
Martchus 53b4cbd8e9 Make fake Qt arguments operations 2020-04-05 21:40:01 +02:00
Martchus 08bfdeed5e Document missing features / caveats of IniFile class 2020-03-15 01:01:34 +01:00
Martchus 6273b42643 Fix remaining hard-coded install dirs
See https://github.com/Martchus/cpp-utilities/issues/17#issuecomment-596420331
2020-03-09 10:45:20 +01:00
Martchus e241d718ce Apply cmake-format 2020-03-05 19:05:33 +01:00
Martchus e94d42f19c Support passing absolute path to CMAKE_INSTALL_BINDIR/LIBDIR
Same as b2a2773 but for CMAKE_INSTALL_BINDIR and CMAKE_INSTALL_LIBDIR.
2020-03-05 14:52:52 +01:00
Martchus a7564b8dde Add TESTUTILS_ASSERT_LIKE_FLAGS to pass regex flags 2020-03-02 18:24:06 +01:00
Martchus bf8e0db87f Construct tuple in in string builder directly 2020-03-02 18:23:38 +01:00
Martchus 8744cf95ef Ensure no copy is made when using argsToString()
It seems that std::make_tuple() is using __decay_and_strip so
the arguments get copied. Using the std::tuple c'tor directly
instead.

When using the %-operator it is already taken care that strings
are stored as pointers and not by value.
2020-02-18 19:29:23 +01:00
Martchus c7c5352325 Use a universal reference to implement dereferenceMaybe() 2020-02-18 19:20:24 +01:00
Martchus 0733f0705d Check one more parent level for LICENSE file
Hack to fix license auto-detection for Plasmoid
2020-02-14 22:30:10 +01:00
Martchus 2b3adc3a6f Don't prefix CMAKE_INSTALL_DATAROOTDIR; it might be absolute
Same as https://github.com/Martchus/cpp-utilities/issues/18 but for
the share directory.
2020-02-14 22:29:07 +01:00
Martchus 561f298567 Fix string builder tests for Windows 2020-02-14 17:14:06 +01:00
Martchus 1154ed4d1c Improve exception messages of NativeFileStream
So one gets e.g. "open failed: Permission denied" instead of
just "open failed: iostream error".
2020-02-14 17:13:05 +01:00
Martchus e5490d7c80 Update documentation of additional build variables 2020-02-14 13:30:42 +01:00
Martchus e9803a41dc Fix inconsistent variables for compile options/definitions
So these options/definitions should no longer be missing in some
places, e.g. the pkg-config file.
2020-02-14 13:22:47 +01:00
Martchus 7204bc6f06 Support using string builder with types convertible to target string type
So e.g. std::filesystem::path can be used to build an std::string.
2020-02-13 17:05:46 +01:00
Martchus 4df320bbed Mention support for GNUInstallDirs in documentation 2020-02-13 11:49:57 +01:00
Martchus 4dd2179f19 Fix remaining install dirs to use GNUInstallDirs consistently 2020-02-13 11:32:28 +01:00
Martchus b2a2773cdf Support passing absolute path to CMAKE_INSTALL_INCLUDEDIR
See https://github.com/Martchus/cpp-utilities/issues/18
2020-02-13 11:19:36 +01:00
Martchus 1eb64f1208 Make install directory for bash completion files customizable
* Use CMAKE_INSTALL_DATAROOTDIR for default
* Allow overriding via BASH_COMPLETION_INSTALL_DIR
2020-02-10 17:22:17 +01:00
Martchus 115133b7a5 Use target name for bash completion file
Otherwise it doesn't seem to be sourced automatically
2020-02-10 17:15:32 +01:00
Martchus 30878fab07 Prevent duplicated LIB_SUFFIX
Some build system macros might pass CMAKE_INSTALL_LIBDIR/LIB_INSTALL_DIR
and LIB_SUFFIX at the same time. I suppose in this case the LIB_SUFFIX
should not be added if it is already present to avoid `lib6464`.
2020-02-04 17:09:47 +01:00
Martchus fe43824c98 Allow passing LIB_INSTALL_DIR as well
That variable (but not `CMAKE_INSTALL_LIBDIR`) is apparently
passed when building for Fedora with the `%cmake` RPM macro.
2020-02-04 15:30:01 +01:00
Martchus dcb1d896c2 Apply cmake-format 2020-02-04 15:24:13 +01:00
Martchus c97dfbfd4c Use GNUInstallDirs
See https://github.com/Martchus/cpp-utilities/issues/17
2020-02-01 00:01:26 +01:00
Martchus eadb261c56 Ignore file system errors when printing bash completion 2020-01-29 19:27:32 +01:00
Martchus 0f56d25251 Use consistent order for visibility attribute 2020-01-29 18:30:02 +01:00
Martchus f5e275288d Reformat CMake files with cmake-format 0.6.7 2020-01-26 19:24:04 +01:00
Martchus 0b56ecfb04 Run cmake-format individually for each file
Seems like cmake-format 0.6.7 only applies CLI options
to the first file anymore. So in order to have the options
applied to all files and not just the first one just
invoke it for each file individually.
2020-01-26 19:23:18 +01:00
Martchus a5283535cc Support nested tuples in string builder
This is useful to concatenate previously constructed sub
strings passed around as tuples.
2020-01-26 19:02:22 +01:00
Martchus 522d2e8cc8 Avoid an indentation level in TestTarget.cmake 2020-01-20 17:57:03 +01:00
Martchus d5930c8d60 Set visbility preset for test application to default 2020-01-20 17:54:28 +01:00
Martchus 585e7de2ab Document `CONFIGURATION_NAME` and related build variables 2020-01-20 17:46:17 +01:00
Martchus 5020214498 Add function to get string representation of phrase 2020-01-14 21:27:46 +01:00
Martchus 0cdf2c3492 Use const where possible in code dealing with profiling data 2020-01-12 21:02:43 +01:00
Martchus a9cb91bee2 Set default visibility explicitely to hidden
Hidden default visibility is already expected to be handled by
users of the library because it is the default under Windows.
2020-01-10 18:05:55 +01:00
Martchus 9d8135bfd7 Require CMake 3.3.0 in all modules 2020-01-10 18:01:13 +01:00
Martchus 8e6854985f Mention CMAKE_<LANG>_CLANG_TIDY in buildvariables doc 2020-01-10 17:57:42 +01:00
Martchus 16103c0662 Add missing <string> include in traits header 2020-01-01 16:38:04 +01:00
Martchus d76d78ae71 Fix childs -> children 2019-12-30 22:52:23 +01:00
Martchus c554aebf07 Use type aliases in IniFile 2019-12-27 01:46:21 +01:00
Martchus 1ce06517cc Apply cmake-format 0.6.5 2019-12-27 01:45:30 +01:00
Martchus 1bdc088b54 Close workingCopy in workingCopyPathAs() for correct error handling 2019-12-15 19:01:04 +01:00
Martchus 07ae1588fa Add writeFile()
Due to the required `file.close()` at then end this is easy
to get wrong. So let's add a helper.
2019-12-15 19:00:15 +01:00
Martchus 3fb40baebc Reformat CMake scripts against cmake-format 0.6.3 2019-12-15 18:58:42 +01:00
Martchus 6376819c07 Apply cmake-format v0.6.0 2019-11-30 17:58:01 +01:00
Martchus 7376a2bb9b Support string builder operator '+' for std::string_view 2019-11-28 23:10:16 +01:00
Martchus b8a60a0cd4 Support string builder operator '%' for std::string_view 2019-11-28 23:05:55 +01:00
Martchus 8e3aa84780 Support std::string_view in stringbuilder.h 2019-11-28 22:34:10 +01:00