Update README.md
This commit is contained in:
parent
668b149647
commit
5dbcd1b391
|
@ -113,7 +113,7 @@ set(META_APP_DESCRIPTION "Useful C++ classes and routines such as argument parse
|
||||||
set(META_FEATURES_FOR_COMPILER_DETECTION_HEADER cxx_thread_local)
|
set(META_FEATURES_FOR_COMPILER_DETECTION_HEADER cxx_thread_local)
|
||||||
set(META_VERSION_MAJOR 5)
|
set(META_VERSION_MAJOR 5)
|
||||||
set(META_VERSION_MINOR 4)
|
set(META_VERSION_MINOR 4)
|
||||||
set(META_VERSION_PATCH 0)
|
set(META_VERSION_PATCH 1)
|
||||||
|
|
||||||
# find required 3rd party libraries
|
# find required 3rd party libraries
|
||||||
include(3rdParty)
|
include(3rdParty)
|
||||||
|
|
42
README.md
42
README.md
|
@ -19,11 +19,11 @@ The library contains helpers for:
|
||||||
- conversion from number to string and vice verca
|
- conversion from number to string and vice verca
|
||||||
- encoding/decoding base-64
|
- encoding/decoding base-64
|
||||||
- building string without multiple heap allocations ("string builder")
|
- building string without multiple heap allocations ("string builder")
|
||||||
* IO
|
* using standard IO streams
|
||||||
- reading/writing primitive data types of various sizes (little-endian and big-endian)
|
- reading/writing primitive data types of various sizes (little-endian and big-endian)
|
||||||
- reading/writing terminated strings and size-prefixed strings
|
- reading/writing terminated strings and size-prefixed strings
|
||||||
- reading/writing INI files
|
- reading/writing INI files
|
||||||
- reading bitwise
|
- reading bitwise (from a buffer; not using standard IO streams)
|
||||||
- writing formatted output using ANSI escape sequences
|
- writing formatted output using ANSI escape sequences
|
||||||
- instantiating a standard IO stream from a native file descriptor to support UTF-8 encoded
|
- instantiating a standard IO stream from a native file descriptor to support UTF-8 encoded
|
||||||
file paths under Windows and Android's `content://` URLs
|
file paths under Windows and Android's `content://` URLs
|
||||||
|
@ -64,18 +64,18 @@ Besides, the library provides a few useful algorithms and data structures:
|
||||||
* For dependencies of my other projects check the README.md of these projects.
|
* For dependencies of my other projects check the README.md of these projects.
|
||||||
|
|
||||||
### How to build
|
### How to build
|
||||||
Just run:
|
Example using `make`:
|
||||||
```
|
```
|
||||||
cd "path/to/build/directory"
|
cd "path/to/build/directory"
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX="/final/install/location" \
|
-DCMAKE_INSTALL_PREFIX="/final/install/location" \
|
||||||
"path/to/projectdirectory"
|
"path/to/projectdirectory"
|
||||||
make tidy # format source files (optional, must be enabled via CLANG_FORMAT_ENABLED)
|
make tidy # format source files (optional, must be enabled via CLANG_FORMAT_ENABLED)
|
||||||
make
|
make # build the binaries
|
||||||
make check # build and run tests (optional)
|
make check # build and run tests (optional)
|
||||||
make coverage # build and run tests measuring test coverage (optional, must be enabled via CLANG_SOURCE_BASED_COVERAGE_ENABLED)
|
make coverage # build and run tests measuring test coverage (optional, must be enabled via CLANG_SOURCE_BASED_COVERAGE_ENABLED)
|
||||||
make apidoc # build API documentation (optional)
|
make apidoc # build API documentation (optional)
|
||||||
make DESTDIR="/temporary/install/location" install
|
make DESTDIR="/temporary/install/location" install # install binaries, headers and additional files
|
||||||
```
|
```
|
||||||
|
|
||||||
#### General notes
|
#### General notes
|
||||||
|
@ -88,12 +88,12 @@ make DESTDIR="/temporary/install/location" install
|
||||||
* If thread local storage is not supported by your compiler/platform (might be the case on MacOS), you can disable making use of it
|
* If thread local storage is not supported by your compiler/platform (might be the case on MacOS), you can disable making use of it
|
||||||
via `ENABLE_THREAD_LOCAL=OFF`.
|
via `ENABLE_THREAD_LOCAL=OFF`.
|
||||||
* To disable use of `std::filesystem`, set `USE_STANDARD_FILESYSTEM=OFF`. This is required when building for MacOS and Android at the time of
|
* To disable use of `std::filesystem`, set `USE_STANDARD_FILESYSTEM=OFF`. This is required when building for MacOS and Android at the time of
|
||||||
writing this documentation. Note that the Bash completion will not be able to suggest files and directory with `USE_STANDARD_FILESYSTEM=OFF`.
|
writing this documentation. Note that the Bash completion will not be able to suggest files and directories with `USE_STANDARD_FILESYSTEM=OFF`.
|
||||||
* For more detailed documentation, see the documentation about build variables (in
|
* For more detailed documentation, see the documentation about build variables (in
|
||||||
[directory doc](https://github.com/Martchus/cpp-utilities/blob/master/doc/buildvariables.md) and
|
[directory doc](https://github.com/Martchus/cpp-utilities/blob/master/doc/buildvariables.md) and
|
||||||
in Doxygen version accessible via "Related Pages").
|
in Doxygen version accessible via "Related Pages").
|
||||||
* The repository [PKGBUILDs](https://github.com/Martchus/PKGBUILDs) contains build scripts for GNU/Linux, Android, Windows and
|
* The repository [PKGBUILDs](https://github.com/Martchus/PKGBUILDs) contains build scripts for GNU/Linux, Android, Windows and
|
||||||
MacOS X in form of Arch Linux packages. These scripts can be used as an example also when building under another platform.
|
MacOS X in form of Arch Linux packages. These scripts can be used as an example also when building under/for other platforms.
|
||||||
|
|
||||||
#### Building for Windows
|
#### Building for Windows
|
||||||
* Building for Windows with GCC as cross compiler and mingw-w64 can be simplified by using a small
|
* Building for Windows with GCC as cross compiler and mingw-w64 can be simplified by using a small
|
||||||
|
@ -104,8 +104,8 @@ make DESTDIR="/temporary/install/location" install
|
||||||
```
|
```
|
||||||
|
|
||||||
* To create the \*.ico file for the application icon ffmpeg/avconv is required.
|
* To create the \*.ico file for the application icon ffmpeg/avconv is required.
|
||||||
* The target ```install-mingw-w64-strip``` can be used as in the example above to only install files
|
* The target `install-mingw-w64-strip` can be used as in the example above to only install files suitable for creating a cross-compiler package
|
||||||
suitable for creating a cross-compiler package and additionally strip the binaries.
|
and additionally strip the binaries.
|
||||||
|
|
||||||
#### Building for MacOS X
|
#### Building for MacOS X
|
||||||
* Building for MacOS X under GNU/Linux is possible using [osxcross](https://github.com/tpoechtrager/osxcross).
|
* Building for MacOS X under GNU/Linux is possible using [osxcross](https://github.com/tpoechtrager/osxcross).
|
||||||
|
@ -113,30 +113,26 @@ make DESTDIR="/temporary/install/location" install
|
||||||
* There are [MacPorts packages](https://www.macports.org/ports.php?by=name&substr=syncthingtray-devel) to build Syncthing Tray
|
* There are [MacPorts packages](https://www.macports.org/ports.php?by=name&substr=syncthingtray-devel) to build Syncthing Tray
|
||||||
|
|
||||||
#### Development builds
|
#### Development builds
|
||||||
During development I find it useful to build all required projects (for instace c++utilities, qtutilities, tagparser and tageditor) as one big project.
|
During development I find it useful to build all required projects (for instace c++utilities, qtutilities, tagparser and tageditor) as one big
|
||||||
|
project.
|
||||||
|
|
||||||
This can be easily achieved by using CMake's ```add_subdirectory()``` function. For project files
|
This can be easily achieved by using CMake's `add_subdirectory()` function. For project files see the repository
|
||||||
see the repository [subdirs](https://github.com/Martchus/subdirs). For an example, see
|
[subdirs](https://github.com/Martchus/subdirs). For an example, see
|
||||||
[build instructions for Syncthing Tray](https://github.com/Martchus/syncthingtray#building-this-straight).
|
[build instructions for Syncthing Tray](https://github.com/Martchus/syncthingtray#building-this-straight).
|
||||||
|
|
||||||
For a debug build, just use ```-DCMAKE_BUILD_TYPE=Debug```.
|
For a debug build, use `-DCMAKE_BUILD_TYPE=Debug`.
|
||||||
|
|
||||||
#### Arch Linux package
|
#### Arch Linux package
|
||||||
The repository [PKGBUILDs](https://github.com/Martchus/PKGBUILDs) contains files for building Arch Linux packages of
|
The repository [PKGBUILDs](https://github.com/Martchus/PKGBUILDs) contains files for building Arch Linux packages of the latest release and
|
||||||
the latest release and the Git master.
|
the Git master.
|
||||||
|
|
||||||
PKGBUILDs to cross compile for Android, Windows (using mingw-w64) and for MacOS X (using osxcross) are included as well.
|
PKGBUILDs to cross compile for Android, Windows (using mingw-w64) and for MacOS X (using osxcross) are included as well.
|
||||||
|
|
||||||
#### RPM packages for openSUSE and Fedora
|
#### RPM packages for openSUSE and Fedora
|
||||||
RPM \*.spec files can be found at [openSUSE Build Servide](https://build.opensuse.org/project/show/home:mkittler).
|
RPM \*.spec files can be found at [openSUSE Build Servide](https://build.opensuse.org/project/show/home:mkittler). Packages are available for
|
||||||
Packages are available for x86_64, aarch64 and armv7l.
|
several architectures.
|
||||||
|
|
||||||
There is also a [sub project](https://build.opensuse.org/project/show/home:mkittler:vcs) containing the builds from
|
There is also a [sub project](https://build.opensuse.org/project/show/home:mkittler:vcs) containing the builds from the Git master branch.
|
||||||
the Git master branch.
|
|
||||||
|
|
||||||
#### Gentoo
|
#### Gentoo
|
||||||
Packages are provided by perfect7gentleman; checkout his [repository](https://github.com/perfect7gentleman/pg_overlay).
|
Packages are provided by perfect7gentleman; checkout his [repository](https://github.com/perfect7gentleman/pg_overlay).
|
||||||
|
|
||||||
### General notes
|
|
||||||
* There is a workaround for [GCC Bug 66145](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66145) provided
|
|
||||||
in io/catchiofailure.h.
|
|
||||||
|
|
Loading…
Reference in New Issue