pre-commit hook to build your cmake projects
Basic configuration:
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:
repos:
- repo: https://github.com/dead-tech/pre-commit-cmake
rev: 'v0.0.4'
hooks:
- id: cmake-build
args: [--release, '--build-dir', '<path>', '--jobs', '<number>']