An open API service indexing awesome lists of open source software.

https://github.com/dead-tech/pre-commit-cmake

pre-commit hook for cmake projects
https://github.com/dead-tech/pre-commit-cmake

Last synced: over 1 year ago
JSON representation

pre-commit hook for cmake projects

Awesome Lists containing this project

README

          

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/dead-tech/pre-commit-cmake/main.svg)](https://results.pre-commit.ci/latest/github/dead-tech/pre-commit-cmake/main)
# pre-commit-cmake

pre-commit hook to build your cmake projects

# Configuration
Basic configuration:
```yaml
repos:
- repo: https://github.com/dead-tech/pre-commit-cmake
rev: 'v0.0.4'
hooks:
- id: cmake-build
```

Optional arguments are:
- --build-dir to change default build directory (build/)
- --release to call cmake in release mode
- --jobs number of jobs to spawn when invoking make (default is 1)

Those arguments can be set like so:
```yaml
repos:
- repo: https://github.com/dead-tech/pre-commit-cmake
rev: 'v0.0.4'
hooks:
- id: cmake-build
args: [--release, '--build-dir', '', '--jobs', '']

```