项目作者: varqox

项目描述 :
Sim C++ utility library
高级语言: C++
项目地址: git://github.com/varqox/simlib.git
创建时间: 2015-08-17T15:51:21Z
项目社区:https://github.com/varqox/simlib

开源协议:MIT License

下载


Repository moved to monorepo: https://github.com/varqox/sim-project

simlib Build Status

simlib is a C++ utility library for Linux originally created for the sim project.

Some functionality documentation

How to build

You will need meson build system to be installed (on most platforms it is in the meson package).

Dependencies

You need a C++ compiler with C++17 support. Meson will point out missing dependencies.

Release build

  1. meson setup release-build/ -Dbuildtype=release -Ddefault_library=both
  2. ninja -C release-build/ base

Development build

  1. meson setup build/ -Dc_args=-DDEBUG -Dcpp_args='-DDEBUG -D_GLIBCXX_DEBUG' -Db_sanitize=undefined -Db_lundef=false
  2. ninja -C build/ base

Static build

Static build is useful if you want to build executables linked statically.

  1. meson setup static-build/ -Ddefault_library=static -Dstatic=true
  2. ninja -C static-build/ base

Installing

Run after building:

  1. # we will use release-build build directory, if you use other just change all release-build below
  2. # if you want to install to default prefix
  3. meson install -C release-build
  4. # specifying other install directory
  5. DESTDIR=other/install/dir/ meson install -C release-build

Running tests

  1. ninja -C build/ test # or other build directory

Development build targets

Formating C/C++ sources

To format all sources (clang-format is required):

  1. ninja -C build format

Linting C/C++ sources

All sources

To lint all sources:

  1. ninja -C build tidy

or

  1. ./tidy

Specified sources

To lint specified sources:

  1. ./tidy path/to/source.cc other/source.h

Static analysis

  1. ninja -C build scan-build