Skip to content

gsalomao/cppdbc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cppdbc

Database Connector for C++

Build Status codecov License: MIT

The cppdbc allows any C++ application to interact with databases.

Installation

Use CMake to build and install the cppdbc.

Dependencies

  • CMake 3.13+

Configuration

The first step is configure the project using CMake.

cmake -B build .

Build

After the project has been configured, the next step is to build the library.

cmake --build build

Installation

After the library has been build, the last step is to install it.

cmake --build build --target install

Tests

The project is shipped with two groups of tests: unit and integration tests.

Dependencies

  • Google Test
  • Google Mock

To run the unit and integration tests, the tests must be enabled during the configuration. of the project.

cmake -B build -D CPPDBC_TESTS=YES .

After the tests has been built, run them calling this command:

cmake --build build --target test

After the tests have been run, the test reports are generated by default in the path build/test-results.

The test results paths can be changed during the configuration of the project.

cmake -B build -D TEST_REPORT_PATH=<path> .

The name of the test reports can also be changed.

cmake -B build -D UNIT_TEST_REPORT_FILE=<file> -D INTEGRATION_TEST_REPORT_FILE=<file> .

To build the test coverage report, the test coverage has to be enabled during the configuration of the project.

cmake -B build -D CPPDBC_COVERAGE=YES .

Once the test coverage has been enabled, and the unit test has been run, the test coverage report can be built.

cmake --build build --target cppdbc_coverage

The test coverage report is generated under the test results path (by default build/test-results).

Static analysis

The project uses static analysis to prevent bugs and improve the code quality.

Dependencies

  • cppcheck

Run the static analysis tool, whenever you would like to check the code.

cmake --build build --target cppdbc_static

Documentation

The project has all classes and functions documented to help the users to understand them.

To build the documentation, the documentation has to be enabled during the configuration of project.

cmake -B build -D CPPDBC_DOC=YES .

Once the documentation is enabled, it can be built.

cmake --build build --target cppdbc_doc

Contributing

Pull requests are welcome.

For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

MIT

About

Database Connector for C++

Resources

License

Stars

Watchers

Forks

Packages

No packages published