mirror of
https://github.com/Vita3K/Vita3K.git
synced 2025-04-02 11:02:10 -04:00
115 lines
3.4 KiB
Markdown
115 lines
3.4 KiB
Markdown
# CppCommon
|
|
|
|
[](LICENSE)
|
|
[](https://github.com/chronoxor/CppCommon/releases)
|
|
<br/>
|
|
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-linux-clang.yml)
|
|
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-linux-gcc.yml)
|
|
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-macos.yml)
|
|
<br/>
|
|
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-windows-cygwin.yml)
|
|
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-windows-msys2.yml)
|
|
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-windows-mingw.yml)
|
|
[](https://github.com/chronoxor/CppCommon/actions/workflows/build-windows-vs.yml)
|
|
|
|
C++ Common Library contains reusable components and patterns for error and
|
|
exceptions handling, filesystem manipulations, math, string format and
|
|
encoding, shared memory, threading, time management and others.
|
|
|
|
[CppCommon API reference](https://chronoxor.github.io/CppCommon/index.html)
|
|
|
|
# Contents
|
|
* [Features](#features)
|
|
* [Requirements](#requirements)
|
|
* [How to build?](#how-to-build)
|
|
|
|
# Features
|
|
* Cross platform (Linux, MacOS, Windows)
|
|
* Exception handling model
|
|
* Filesystem manipulations
|
|
* String encoding converters
|
|
* String format using [{fmt} library](http://fmtlib.net)
|
|
* CPU, memory, environment
|
|
* Shared memory
|
|
* Stack trace
|
|
* UUID generator
|
|
* Thread extensions (priority, affinity, yield)
|
|
* Thread barrier, latch
|
|
* Synchronization primitives
|
|
* Named synchronization primitives
|
|
* Producer/consumer queues
|
|
* Time management
|
|
* Utilities
|
|
|
|
# Requirements
|
|
* Linux
|
|
* MacOS
|
|
* Windows
|
|
* [cmake](https://www.cmake.org)
|
|
* [gcc](https://gcc.gnu.org)
|
|
* [git](https://git-scm.com)
|
|
* [gil](https://github.com/chronoxor/gil.git)
|
|
* [python3](https://www.python.org)
|
|
|
|
Optional:
|
|
* [clang](https://clang.llvm.org)
|
|
* [CLion](https://www.jetbrains.com/clion)
|
|
* [Cygwin](https://cygwin.com)
|
|
* [MSYS2](https://www.msys2.org)
|
|
* [MinGW](https://mingw-w64.org/doku.php)
|
|
* [Visual Studio](https://www.visualstudio.com)
|
|
|
|
# How to build?
|
|
|
|
### Linux: install required packages
|
|
```shell
|
|
sudo apt-get install -y binutils-dev uuid-dev
|
|
```
|
|
|
|
### Install [gil (git links) tool](https://github.com/chronoxor/gil)
|
|
```shell
|
|
pip3 install gil
|
|
```
|
|
|
|
### Setup repository
|
|
```shell
|
|
git clone https://github.com/chronoxor/CppCommon.git
|
|
cd CppCommon
|
|
gil update
|
|
```
|
|
|
|
### Linux
|
|
```shell
|
|
cd build
|
|
./unix.sh
|
|
```
|
|
|
|
### MacOS
|
|
```shell
|
|
cd build
|
|
./unix.sh
|
|
```
|
|
|
|
### Windows (Cygwin)
|
|
```shell
|
|
cd build
|
|
unix.bat
|
|
```
|
|
|
|
### Windows (MSYS2)
|
|
```shell
|
|
cd build
|
|
unix.bat
|
|
```
|
|
|
|
### Windows (MinGW)
|
|
```shell
|
|
cd build
|
|
mingw.bat
|
|
```
|
|
|
|
### Windows (Visual Studio)
|
|
```shell
|
|
cd build
|
|
vs.bat
|
|
```
|