Investigates best way to build modern project for develop UNIX C++ library based on C API for binding any language
Build status | Systems / Compilers |
---|---|
Linux (gcc) OSX (XCode 10.2 clang) |
- Creates shared(*.so, *.dylib) library
- Google test(gtest) simple and powerful test framework
- Catch2 single header test library
- Python bindings Load library and call C API function from Python.
- Codecov - reports generate automatically
- Docker file and auto build with Docker Hub
- Travis-CI auto build for ubuntu xenial and osx
- Cppcheck is a static analysis tool for C/C++ code
- Google Test (gtest) - test framework
- gcov / lcov - generates and shows in html format code coverage
git clone https://github.com/armatusmiles/modern-cpp-lib.git \
&& cd modern-cpp-lib \
&& mkdir build && cd build \
&& cmake ../ \
&& make moderncpp_coverage
cppcheck simple example
cppcheck ./src/
Checking src/interface.cpp ...
[src/interface.cpp:11]: (error) Array 'a[5]' accessed at index 6, which is out of bounds.
Notice: For choose catch2 test framework. Should add var -DTEST_TYPE="catch2"
Exmaple : cmake ../ -DTEST_TYPE="catch2"
"make moderncpp_coverage" builds library, runs gtest and generate code coverage(html) report